From 802be72ca69f8f45fa9db843742e5102007df70f Mon Sep 17 00:00:00 2001 From: Daniel Fiala Date: Sun, 18 Mar 2018 06:25:52 +0100 Subject: [PATCH] storage_service: Support la sstable storage format as a feature. Signed-off-by: Daniel Fiala --- service/storage_service.cc | 3 +++ service/storage_service.hh | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/service/storage_service.cc b/service/storage_service.cc index 199ea1747b..acae675247 100644 --- a/service/storage_service.cc +++ b/service/storage_service.cc @@ -92,6 +92,7 @@ static const sstring CORRECT_COUNTER_ORDER_FEATURE = "CORRECT_COUNTER_ORDER"; static const sstring SCHEMA_TABLES_V3 = "SCHEMA_TABLES_V3"; static const sstring CORRECT_NON_COMPOUND_RANGE_TOMBSTONES = "CORRECT_NON_COMPOUND_RANGE_TOMBSTONES"; static const sstring WRITE_FAILURE_REPLY_FEATURE = "WRITE_FAILURE_REPLY"; +static const sstring LA_SSTABLE_FEATURE = "LA_SSTABLE_FORMAT"; distributed _the_storage_service; @@ -139,6 +140,7 @@ sstring storage_service::get_config_supported_features() { SCHEMA_TABLES_V3, CORRECT_NON_COMPOUND_RANGE_TOMBSTONES, WRITE_FAILURE_REPLY_FEATURE, + LA_SSTABLE_FEATURE, }; if (service::get_local_storage_service()._db.local().get_config().experimental()) { features.push_back(MATERIALIZED_VIEWS_FEATURE); @@ -351,6 +353,7 @@ void storage_service::register_features() { _schema_tables_v3 = gms::feature(SCHEMA_TABLES_V3); _correct_non_compound_range_tombstones = gms::feature(CORRECT_NON_COMPOUND_RANGE_TOMBSTONES); _write_failure_reply_feature = gms::feature(WRITE_FAILURE_REPLY_FEATURE); + _la_sstable_feature = gms::feature(LA_SSTABLE_FEATURE); if (_db.local().get_config().experimental()) { _materialized_views_feature = gms::feature(MATERIALIZED_VIEWS_FEATURE); diff --git a/service/storage_service.hh b/service/storage_service.hh index c689b73a6c..3bb91bece1 100644 --- a/service/storage_service.hh +++ b/service/storage_service.hh @@ -275,6 +275,7 @@ private: gms::feature _schema_tables_v3; gms::feature _correct_non_compound_range_tombstones; gms::feature _write_failure_reply_feature; + gms::feature _la_sstable_feature; public: void enable_all_features() { _range_tombstones_feature.enable(); @@ -287,6 +288,7 @@ public: _schema_tables_v3.enable(); _correct_non_compound_range_tombstones.enable(); _write_failure_reply_feature.enable(); + _la_sstable_feature.enable(); } void finish_bootstrapping() { @@ -2259,6 +2261,10 @@ public: bool cluster_supports_write_failure_reply() const { return bool(_write_failure_reply_feature); } + + bool cluster_supports_la_sstable() const { + return bool(_la_sstable_feature); + } }; inline future<> init_storage_service(distributed& db, sharded& auth_service) {