mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-03 21:47:10 +00:00
sstables: update tombstone_histogram for cells with expiration time
That tombstone_histogram is used to determine droppable data ratio for a sstable, and unlike C*, we were only updating it for tombstones. We need to update it with expiration time of cells too, if any. Creation time (expiration - ttl) cannot be used because if ttl > gc_grace_seconds, the resulting sstable could be considered worth dropping by tomstone compaction before any data is actually expired. Signed-off-by: Raphael S. Carvalho <raphaelsc@scylladb.com>
This commit is contained in:
@@ -1457,6 +1457,10 @@ void sstable::write_cell(file_writer& out, atomic_cell_view cell, const column_d
|
||||
disk_string_view<uint32_t> cell_value { cell.value() };
|
||||
|
||||
_c_stats.update_max_local_deletion_time(expiration);
|
||||
// tombstone histogram is updated with expiration time because if ttl is longer
|
||||
// than gc_grace_seconds for all data, sstable will be considered fully expired
|
||||
// when actually nothing is expired.
|
||||
_c_stats.tombstone_histogram.update(expiration);
|
||||
|
||||
write(out, mask, ttl, expiration, timestamp, cell_value);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user