storage_service: add COUNTERS feature

This commit is contained in:
Paweł Dziepak
2017-01-30 19:50:13 +00:00
parent 9989239c97
commit 67ca6959bd
2 changed files with 9 additions and 0 deletions

View File

@@ -83,6 +83,7 @@ static logging::logger logger("storage_service");
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";
distributed<storage_service> _the_storage_service;
@@ -125,6 +126,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);
}
return join(",", features);
}
@@ -1349,6 +1351,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);
}
}).get();
});

View File

@@ -261,12 +261,14 @@ private:
gms::feature _range_tombstones_feature;
gms::feature _large_partitions_feature;
gms::feature _materialized_views_feature;
gms::feature _counters_feature;
public:
void enable_all_features() {
_range_tombstones_feature.enable();
_large_partitions_feature.enable();
_materialized_views_feature.enable();
_counters_feature.enable();
}
void finish_bootstrapping() {
@@ -2224,6 +2226,10 @@ public:
bool cluster_supports_materialized_views() const {
return bool(_materialized_views_feature);
}
bool cluster_supports_counters() const {
return bool(_counters_feature);
}
};
inline future<> init_storage_service(distributed<database>& db) {