From 54d49c04e0e18952c091255e7fa9d9bd1898e564 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 10 Jan 2024 17:23:33 +0800 Subject: [PATCH] db, sstable: bump up default sstable format to "md" before this change, we defaults to use "mc" sstable format, and switch to "md" if the cluster agrees on using it, and to "me" if the cluster agrees on using this. the cluster feature is used to get the consensus across the members in the cluster, if any of the existing nodes in the cluster has its `sstable_format` configured to, for instance, "mc", then the cluster is stuck with "mc". but we disabled "mc" sstable format back in 3d345609, the first LTS release including that change was scylla v5.2.0. which means, the cluster of the last major version Scylla should be using "md" or "me". per our document on upgrade, see docs/upgrade/index.rst, > You should perform the upgrades consecutively - to each > successive X.Y version, without skipping any major or minor version. > > Before you upgrade to the next version, the whole cluster (each > node) must be upgraded to the previous version. we can assume that, a 6.x node will only join a cluster with 5.x or 6.x nodes. (joining a 7.x cluster should work, but this is not relevant to this change). in both cases, since 5.x and up scylla can only configured with "md" `sstable_format`, there is no need to switch from "mc" to "md" anymore. so we can ditch the code supporting it. Refs #16551 Signed-off-by: Kefu Chai --- db/sstables-format-selector.cc | 2 -- db/sstables-format-selector.hh | 1 - sstables/sstables_manager.hh | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/db/sstables-format-selector.cc b/db/sstables-format-selector.cc index cfa0c9ab11..110bc5b139 100644 --- a/db/sstables-format-selector.cc +++ b/db/sstables-format-selector.cc @@ -66,7 +66,6 @@ sstables_format_listener::sstables_format_listener(gms::gossiper& g, sharded sstables_format_listener::start() { // The listener may fire immediately, create a thread for that case. co_await seastar::async([this] { _features.local().me_sstable.when_enabled(_me_feature_listener); - _features.local().md_sstable.when_enabled(_md_feature_listener); }); } diff --git a/db/sstables-format-selector.hh b/db/sstables-format-selector.hh index 6f4c63557d..1b435f57c1 100644 --- a/db/sstables-format-selector.hh +++ b/db/sstables-format-selector.hh @@ -68,7 +68,6 @@ class sstables_format_listener { seastar::named_semaphore _sem = {1, named_semaphore_exception_factory{"feature listeners"}}; seastar::gate _sel; - feature_enabled_listener _md_feature_listener; feature_enabled_listener _me_feature_listener; public: sstables_format_listener(gms::gossiper& g, sharded& f, sstables_format_selector& selector); diff --git a/sstables/sstables_manager.hh b/sstables/sstables_manager.hh index 5b92ecabf8..aa5b2b8788 100644 --- a/sstables/sstables_manager.hh +++ b/sstables/sstables_manager.hh @@ -89,7 +89,7 @@ private: // that format. read_sstables_format() also overwrites _sstables_format // if an sstable format was chosen earlier (and this choice was persisted // in the system table). - sstable_version_types _format = sstable_version_types::mc; + sstable_version_types _format = sstable_version_types::md; // _active and _undergoing_close are used in scylla-gdb.py to fetch all sstables // on current shard using "scylla sstables" command. If those fields are renamed,