storage_service: Add "truncation_table" feature
This commit is contained in:
@@ -106,6 +106,7 @@ static const sstring LA_SSTABLE_FEATURE = "LA_SSTABLE_FORMAT";
|
||||
static const sstring STREAM_WITH_RPC_STREAM = "STREAM_WITH_RPC_STREAM";
|
||||
static const sstring MC_SSTABLE_FEATURE = "MC_SSTABLE_FORMAT";
|
||||
static const sstring ROW_LEVEL_REPAIR = "ROW_LEVEL_REPAIR";
|
||||
static const sstring TRUNCATION_TABLE = "TRUNCATION_TABLE";
|
||||
|
||||
distributed<storage_service> _the_storage_service;
|
||||
|
||||
@@ -150,6 +151,7 @@ storage_service::storage_service(distributed<database>& db, sharded<auth::servic
|
||||
, _stream_with_rpc_stream_feature(_feature_service, STREAM_WITH_RPC_STREAM)
|
||||
, _mc_sstable_feature(_feature_service, MC_SSTABLE_FEATURE)
|
||||
, _row_level_repair_feature(_feature_service, ROW_LEVEL_REPAIR)
|
||||
, _truncation_table(_feature_service, TRUNCATION_TABLE)
|
||||
, _replicate_action([this] { return do_replicate_to_all_cores(); })
|
||||
, _update_pending_ranges_action([this] { return do_update_pending_ranges(); })
|
||||
, _sys_dist_ks(sys_dist_ks)
|
||||
@@ -178,6 +180,7 @@ void storage_service::enable_all_features() {
|
||||
_stream_with_rpc_stream_feature.enable();
|
||||
_mc_sstable_feature.enable();
|
||||
_row_level_repair_feature.enable();
|
||||
_truncation_table.enable();
|
||||
}
|
||||
|
||||
enum class node_external_status {
|
||||
@@ -254,7 +257,8 @@ sstring storage_service::get_config_supported_features() {
|
||||
STREAM_WITH_RPC_STREAM,
|
||||
MATERIALIZED_VIEWS_FEATURE,
|
||||
INDEXES_FEATURE,
|
||||
ROW_LEVEL_REPAIR
|
||||
ROW_LEVEL_REPAIR,
|
||||
TRUNCATION_TABLE,
|
||||
};
|
||||
auto& config = service::get_local_storage_service()._db.local().get_config();
|
||||
if (config.enable_sstables_mc_format()) {
|
||||
|
||||
@@ -296,6 +296,7 @@ private:
|
||||
gms::feature _stream_with_rpc_stream_feature;
|
||||
gms::feature _mc_sstable_feature;
|
||||
gms::feature _row_level_repair_feature;
|
||||
gms::feature _truncation_table;
|
||||
public:
|
||||
void enable_all_features();
|
||||
|
||||
@@ -2288,6 +2289,9 @@ public:
|
||||
bool cluster_supports_row_level_repair() const {
|
||||
return bool(_row_level_repair_feature);
|
||||
}
|
||||
const gms::feature& cluster_supports_truncation_table() const {
|
||||
return _truncation_table;
|
||||
}
|
||||
private:
|
||||
future<> set_cql_ready(bool ready);
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user