From ca31dab9d232dba03cc023fe7341d9e850a94a55 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 24 Nov 2023 14:56:34 +0800 Subject: [PATCH] sstable: drop repaired_at related code before we support incremental repair, these is no point have the code path setting / getting it. and even worse, it incurs confusion. so, in this change, we * just set the field to 0, * drop the corresponding field in metadata_collector, as we never update it. * add a comment to explain why this variable is initialized to 0 Fixes #16098 Signed-off-by: Kefu Chai Closes scylladb/scylladb#16169 --- sstables/metadata_collector.hh | 6 ------ sstables/types.hh | 4 +++- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/sstables/metadata_collector.hh b/sstables/metadata_collector.hh index 047a6aa8ca..44dfd89302 100644 --- a/sstables/metadata_collector.hh +++ b/sstables/metadata_collector.hh @@ -114,7 +114,6 @@ private: utils::estimated_histogram _estimated_cells_count{114}; db::replay_position _replay_position; min_max_tracker _timestamp_tracker; - uint64_t _repaired_at = 0; min_max_tracker _local_deletion_time_tracker{std::numeric_limits::max(), std::numeric_limits::max()}; min_max_tracker _ttl_tracker{0, 0}; double _compression_ratio = NO_COMPRESSION_RATIO; @@ -180,10 +179,6 @@ public: _replay_position = rp; } - void set_repaired_at(uint64_t repaired_at) { - _repaired_at = repaired_at; - } - void set_sstable_level(int sstable_level) { _sstable_level = sstable_level; } @@ -225,7 +220,6 @@ public: m.compression_ratio = _compression_ratio; m.estimated_tombstone_drop_time = std::move(_estimated_tombstone_drop_time); m.sstable_level = _sstable_level; - m.repaired_at = _repaired_at; convert(m.min_column_names, _min_clustering_pos); convert(m.max_column_names, _max_clustering_pos); m.has_legacy_counter_shards = _has_legacy_counter_shards; diff --git a/sstables/types.hh b/sstables/types.hh index 5ba10673ce..681e456768 100644 --- a/sstables/types.hh +++ b/sstables/types.hh @@ -311,7 +311,9 @@ struct stats_metadata : public metadata_base { double compression_ratio; utils::streaming_histogram estimated_tombstone_drop_time; uint32_t sstable_level; - uint64_t repaired_at; + // There is not meaningful value to put in this field, since we have no + // incremental repair. Before we have it, let's set it to 0. + uint64_t repaired_at = 0; disk_array> min_column_names; disk_array> max_column_names; bool has_legacy_counter_shards;