diff --git a/service/storage_service.cc b/service/storage_service.cc index 69f9d0a91d..37ca2cfa64 100644 --- a/service/storage_service.cc +++ b/service/storage_service.cc @@ -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 _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(); }); diff --git a/service/storage_service.hh b/service/storage_service.hh index 643fd2eae3..a15a97bbb8 100644 --- a/service/storage_service.hh +++ b/service/storage_service.hh @@ -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& db) {