storage_service: Include range tombstones feature

This patch adds the range tombstones feature, which is not enabled
yet, to the storage_service, so that consumers can query for it.

Signed-off-by: Duarte Nunes <duarte@scylladb.com>
This commit is contained in:
Duarte Nunes
2016-05-31 11:44:17 +02:00
parent 17a544c4a6
commit e46537b7d3
2 changed files with 13 additions and 0 deletions

View File

@@ -78,6 +78,8 @@ namespace service {
static logging::logger logger("storage_service");
static const sstring RANGE_TOMBSTONES_FEATURE = "RANGE_TOMBSTONES";
distributed<storage_service> _the_storage_service;
int get_generation_number() {
@@ -1148,6 +1150,10 @@ future<> storage_service::init_server(int delay) {
}
logger.info("Not joining ring as requested. Use JMX (StorageService->joinRing()) to initiate ring joining");
}
get_storage_service().invoke_on_all([] (auto& ss) {
ss._range_tombstones_feature = gms::feature(RANGE_TOMBSTONES_FEATURE);
}).get();
});
}

View File

@@ -58,6 +58,7 @@
#include "streaming/stream_plan.hh"
#include <seastar/core/distributed.hh>
#include "disk-error-handler.hh"
#include "gms/feature.hh"
namespace transport {
class cql_server;
@@ -266,6 +267,8 @@ private:
private:
std::unordered_set<token> _bootstrap_tokens;
gms::feature _range_tombstones_feature;
public:
void finish_bootstrapping() {
_is_bootstrap_mode = false;
@@ -2356,6 +2359,10 @@ private:
void do_isolate_on_error(disk_error type);
public:
static sstring get_config_supported_features();
bool cluster_supports_range_tombstones() {
return bool(_range_tombstones_feature);
}
};
inline future<> init_storage_service(distributed<database>& db) {