storage_service: Introduce SCHEMA_TABLES_V3 feature

This commit is contained in:
Tomasz Grabiec
2017-09-14 19:15:41 +02:00
parent f943d2efbf
commit 713d75fd51
2 changed files with 9 additions and 0 deletions

View File

@@ -89,6 +89,7 @@ static const sstring COUNTERS_FEATURE = "COUNTERS";
static const sstring INDEXES_FEATURE = "INDEXES";
static const sstring DIGEST_MULTIPARTITION_READ_FEATURE = "DIGEST_MULTIPARTITION_READ";
static const sstring CORRECT_COUNTER_ORDER_FEATURE = "CORRECT_COUNTER_ORDER";
static const sstring SCHEMA_TABLES_V3 = "SCHEMA_TABLES_V3";
distributed<storage_service> _the_storage_service;
@@ -131,6 +132,7 @@ sstring storage_service::get_config_supported_features() {
COUNTERS_FEATURE,
DIGEST_MULTIPARTITION_READ_FEATURE,
CORRECT_COUNTER_ORDER_FEATURE,
SCHEMA_TABLES_V3
};
if (service::get_local_storage_service()._db.local().get_config().experimental()) {
features.push_back(MATERIALIZED_VIEWS_FEATURE);
@@ -1357,6 +1359,7 @@ future<> storage_service::init_server(int delay) {
ss._counters_feature = gms::feature(COUNTERS_FEATURE);
ss._digest_multipartition_read_feature = gms::feature(DIGEST_MULTIPARTITION_READ_FEATURE);
ss._correct_counter_order_feature = gms::feature(CORRECT_COUNTER_ORDER_FEATURE);
ss._schema_tables_v3 = gms::feature(SCHEMA_TABLES_V3);
if (ss._db.local().get_config().experimental()) {
ss._materialized_views_feature = gms::feature(MATERIALIZED_VIEWS_FEATURE);

View File

@@ -265,6 +265,7 @@ private:
gms::feature _indexes_feature;
gms::feature _digest_multipartition_read_feature;
gms::feature _correct_counter_order_feature;
gms::feature _schema_tables_v3;
public:
void enable_all_features() {
_range_tombstones_feature.enable();
@@ -274,6 +275,7 @@ public:
_indexes_feature.enable();
_digest_multipartition_read_feature.enable();
_correct_counter_order_feature.enable();
_schema_tables_v3.enable();
}
void finish_bootstrapping() {
@@ -2247,6 +2249,10 @@ public:
bool cluster_supports_correct_counter_order() const {
return bool(_correct_counter_order_feature);
}
bool cluster_supports_schema_tables_v3() const {
return bool(_schema_tables_v3);
}
};
inline future<> init_storage_service(distributed<database>& db) {