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 <duarte@scylladb.com>
This commit is contained in:
Duarte Nunes
2017-11-22 12:28:10 +00:00
parent eeacef3089
commit ae3a58d7ec

View File

@@ -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<database>& db, sharded<auth::service>& auth_service) {