gms: add keyspace_multi_rf_change feature

This commit is contained in:
Aleksandra Martyniuk
2025-05-30 11:28:32 +02:00
parent 04b54f363b
commit 7cdf7d62a2
3 changed files with 10 additions and 1 deletions

View File

@@ -33,6 +33,11 @@ enum class schema_feature {
// Per-table tablet options
TABLET_OPTIONS,
// When enabled, `system_schema.keyspaces` will keep three replication values:
// the initial, the current, and the target replication factor,
// which reflect the phases of the multi RF change.
KEYSPACE_MULTI_RF_CHANGE,
};
using schema_features = enum_set<super_enum<schema_feature,
@@ -43,7 +48,8 @@ using schema_features = enum_set<super_enum<schema_feature,
schema_feature::TABLE_DIGEST_INSENSITIVE_TO_EXPIRY,
schema_feature::GROUP0_SCHEMA_VERSIONING,
schema_feature::IN_MEMORY_TABLES,
schema_feature::TABLET_OPTIONS
schema_feature::TABLET_OPTIONS,
schema_feature::KEYSPACE_MULTI_RF_CHANGE
>>;
}

View File

@@ -7,6 +7,7 @@
#include <seastar/core/sstring.hh>
#include <seastar/core/seastar.hh>
#include <seastar/core/smp.hh>
#include "db/schema_features.hh"
#include "utils/log.hh"
#include "gms/feature.hh"
#include "gms/feature_service.hh"
@@ -179,6 +180,7 @@ db::schema_features feature_service::cluster_schema_features() const {
f.set<db::schema_feature::GROUP0_SCHEMA_VERSIONING>();
f.set_if<db::schema_feature::IN_MEMORY_TABLES>(bool(in_memory_tables));
f.set_if<db::schema_feature::TABLET_OPTIONS>(bool(tablet_options));
f.set_if<db::schema_feature::KEYSPACE_MULTI_RF_CHANGE>(bool(keyspace_multi_rf_change));
return f;
}

View File

@@ -182,6 +182,7 @@ public:
gms::feature writetime_ttl_individual_element { *this, "WRITETIME_TTL_INDIVIDUAL_ELEMENT"sv };
gms::feature arbitrary_tablet_boundaries { *this, "ARBITRARY_TABLET_BOUNDARIES"sv };
gms::feature large_data_virtual_tables { *this, "LARGE_DATA_VIRTUAL_TABLES"sv };
gms::feature keyspace_multi_rf_change { *this, "KEYSPACE_MULTI_RF_CHANGE"sv };
public:
const std::unordered_map<sstring, std::reference_wrapper<feature>>& registered_features() const;