storage_service: Introduce STREAM_WITH_RPC_STREAM feature

With this feature, the node supports scylla streaming using the rpc
streaming.
This commit is contained in:
Asias He
2018-05-25 10:37:54 +08:00
parent faa6769cdb
commit 71e22fe981
2 changed files with 9 additions and 0 deletions

View File

@@ -98,6 +98,7 @@ static const sstring WRITE_FAILURE_REPLY_FEATURE = "WRITE_FAILURE_REPLY";
static const sstring XXHASH_FEATURE = "XXHASH";
static const sstring ROLES_FEATURE = "ROLES";
static const sstring LA_SSTABLE_FEATURE = "LA_SSTABLE_FORMAT";
static const sstring STREAM_WITH_RPC_STREAM = "STREAM_WITH_RPC_STREAM";
distributed<storage_service> _the_storage_service;
@@ -163,6 +164,7 @@ sstring storage_service::get_config_supported_features() {
XXHASH_FEATURE,
ROLES_FEATURE,
LA_SSTABLE_FEATURE,
STREAM_WITH_RPC_STREAM,
};
if (service::get_local_storage_service()._db.local().get_config().experimental()) {
features.push_back(MATERIALIZED_VIEWS_FEATURE);
@@ -380,6 +382,7 @@ void storage_service::register_features() {
_xxhash_feature = gms::feature(XXHASH_FEATURE);
_roles_feature = gms::feature(ROLES_FEATURE);
_la_sstable_feature = gms::feature(LA_SSTABLE_FEATURE);
_stream_with_rpc_stream_feature = gms::feature(STREAM_WITH_RPC_STREAM);
if (_db.local().get_config().experimental()) {
_materialized_views_feature = gms::feature(MATERIALIZED_VIEWS_FEATURE);

View File

@@ -285,6 +285,7 @@ private:
gms::feature _xxhash_feature;
gms::feature _roles_feature;
gms::feature _la_sstable_feature;
gms::feature _stream_with_rpc_stream_feature;
public:
void enable_all_features() {
_range_tombstones_feature.enable();
@@ -300,6 +301,7 @@ public:
_xxhash_feature.enable();
_roles_feature.enable();
_la_sstable_feature.enable();
_stream_with_rpc_stream_feature.enable();
}
void finish_bootstrapping() {
@@ -2312,6 +2314,10 @@ public:
bool cluster_supports_la_sstable() const {
return bool(_la_sstable_feature);
}
bool cluster_supports_stream_with_rpc_stream() const {
return bool(_stream_with_rpc_stream_feature);
}
};
inline future<> init_storage_service(distributed<database>& db, sharded<auth::service>& auth_service, sharded<db::system_distributed_keyspace>& sys_dist_ks) {