db/config.cc: do not respect sstable_format option

"me" sstable format includes an important feature of storing the
`host_id` of the local node when writing sstables. The is crucial
for validating the sstable's `replay_position` in stats metadata as
it is valid only on the originating node and shard (#10080), therefor
we would like to make the `me` format mandatory.

before making `me` mandatory, we need to stop handling `sstable_format`
option if it is "md".

in this change

- gms/feature_service: do not disable `ME_SSTABLE_FORMAT` even if
  `sstable_format` is configured with "md". and in that case, instead,
  a warning is printed in the logging message to note that
  this setting is not valid anymore.
- docs/architecture/sstable: note that "me" is used by default now.

after this change, "sstable_format" will only accept "me" if it's
explicitly configured. and when a server with this change joins a
cluster, it uses "md" if the any of the node in the cluster still has
`sstable_format`. practically, this change makes "me" mandatory
in a 6.x cluster, assuming this change will be included in 6.x
releases.

Fixes #16551
Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
This commit is contained in:
Kefu Chai
2024-01-09 10:59:23 +08:00
parent bece3eff0c
commit 7abd263ee6
3 changed files with 5 additions and 2 deletions

View File

@@ -9,6 +9,8 @@ ScyllaDB SSTable Format
.. include:: _common/sstable_what_is.rst
* In Scylla 5.5 and above, *me* format is enabled by default.
* In Scylla Enterprise 2021.1, Scylla 4.3 and above, *md* format is enabled by default.
* In Scylla 3.1 and above, *mc* format is enabled by default.

View File

@@ -12,6 +12,7 @@ ScyllaDB SSTable - 3.x
.. include:: ../_common/sstable_what_is.rst
* In ScyllaDB 5.5 and above, the ``me`` format is mandatory, and ``md`` format is used only when upgrading from an existing cluster using ``md``. The ``sstable_format`` parameter is ignored if it is set to ``md``.
* In ScyllaDB 5.1 and above, the ``me`` format is enabled by default.
* In ScyllaDB 4.3 to 5.0, the ``md`` format is enabled by default.
* In ScyllaDB 3.1 to 4.2, the ``mc`` format is enabled by default.

View File

@@ -53,8 +53,8 @@ feature_config feature_config_from_db_config(const db::config& cfg, std::set<sst
switch (sstables::version_from_string(cfg.sstable_format())) {
case sstables::sstable_version_types::md:
fcfg._disabled_features.insert("ME_SSTABLE_FORMAT"s);
[[fallthrough]];
logger.warn("sstable_format must be 'me', '{}' is specified", cfg.sstable_format());
break;
case sstables::sstable_version_types::me:
break;
default: