service/storage_service: Add feature flag for secondary indices
This commit is contained in:
@@ -84,6 +84,7 @@ static const sstring RANGE_TOMBSTONES_FEATURE = "RANGE_TOMBSTONES";
|
||||
static const sstring LARGE_PARTITIONS_FEATURE = "LARGE_PARTITIONS";
|
||||
static const sstring MATERIALIZED_VIEWS_FEATURE = "MATERIALIZED_VIEWS";
|
||||
static const sstring COUNTERS_FEATURE = "COUNTERS";
|
||||
static const sstring INDEXES_FEATURE = "INDEXES";
|
||||
|
||||
distributed<storage_service> _the_storage_service;
|
||||
|
||||
@@ -127,6 +128,7 @@ sstring storage_service::get_config_supported_features() {
|
||||
if (service::get_local_storage_service()._db.local().get_config().experimental()) {
|
||||
features.push_back(MATERIALIZED_VIEWS_FEATURE);
|
||||
features.push_back(COUNTERS_FEATURE);
|
||||
features.push_back(INDEXES_FEATURE);
|
||||
}
|
||||
return join(",", features);
|
||||
}
|
||||
@@ -1355,6 +1357,7 @@ future<> storage_service::init_server(int delay) {
|
||||
if (ss._db.local().get_config().experimental()) {
|
||||
ss._materialized_views_feature = gms::feature(MATERIALIZED_VIEWS_FEATURE);
|
||||
ss._counters_feature = gms::feature(COUNTERS_FEATURE);
|
||||
ss._indexes_feature = gms::feature(INDEXES_FEATURE);
|
||||
}
|
||||
}).get();
|
||||
});
|
||||
|
||||
@@ -262,6 +262,7 @@ private:
|
||||
gms::feature _large_partitions_feature;
|
||||
gms::feature _materialized_views_feature;
|
||||
gms::feature _counters_feature;
|
||||
gms::feature _indexes_feature;
|
||||
|
||||
public:
|
||||
void enable_all_features() {
|
||||
@@ -269,6 +270,7 @@ public:
|
||||
_large_partitions_feature.enable();
|
||||
_materialized_views_feature.enable();
|
||||
_counters_feature.enable();
|
||||
_indexes_feature.enable();
|
||||
}
|
||||
|
||||
void finish_bootstrapping() {
|
||||
@@ -2230,6 +2232,10 @@ public:
|
||||
bool cluster_supports_counters() const {
|
||||
return bool(_counters_feature);
|
||||
}
|
||||
|
||||
bool cluster_supports_indexes() const {
|
||||
return bool(_indexes_feature);
|
||||
}
|
||||
};
|
||||
|
||||
inline future<> init_storage_service(distributed<database>& db) {
|
||||
|
||||
Reference in New Issue
Block a user