From ae3a58d7ecfebac19e673f09c341ceff074e0aa3 Mon Sep 17 00:00:00 2001 From: Duarte Nunes Date: Wed, 22 Nov 2017 12:28:10 +0000 Subject: [PATCH] service/storage_service: Add feature for correct non-compound RTs This patch adds a cluster feature to enable correct serialization of non-compound range tombstones. We thus support rollbacks during an upgrade, as we will only change range tombstone serialization when the cluster is fully upgraded and all nodes are capable of reading the new format. Signed-off-by: Duarte Nunes --- service/storage_service.hh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/service/storage_service.hh b/service/storage_service.hh index fc0765fbe8..fe5656140f 100644 --- a/service/storage_service.hh +++ b/service/storage_service.hh @@ -269,6 +269,7 @@ private: gms::feature _digest_multipartition_read_feature; gms::feature _correct_counter_order_feature; gms::feature _schema_tables_v3; + gms::feature _correct_non_compound_range_tombstones; public: void enable_all_features() { _range_tombstones_feature.enable(); @@ -2243,6 +2244,10 @@ public: const gms::feature& cluster_supports_schema_tables_v3() const { return _schema_tables_v3; } + + bool cluster_supports_reading_correctly_serialized_range_tombstones() const { + return bool(_correct_non_compound_range_tombstones); + } }; inline future<> init_storage_service(distributed& db, sharded& auth_service) {