Files
scylladb/mutation/mutation_tombstone_stats.hh
Łukasz Paszkowski 546b2c191f mutation_compactor: Collect tombstone purge attempts
Let compact_mutation_state collect all tombstone purge attempts
and failures. For this purpose a new statistic structure is created
(tombstone_purge_stats) and the relative stats are collected in
the can_purge_tombstone method.

The statistics are collect only for sstables compaction.

An optional statistics structure can be passed in via compact_mutation_state
constructor.
2025-05-16 20:00:00 +02:00

33 lines
928 B
C++

/*
* Copyright (C) 2025-present ScyllaDB
*/
/*
* SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0
*/
#pragma once
#include <cstdint>
struct tombstone_purge_stats {
int64_t attempts { 0 };
int64_t failures_due_to_overlapping_with_memtable { 0 };
int64_t failures_due_to_overlapping_with_uncompacting_sstable { 0 };
int64_t failures_other { 0 };
tombstone_purge_stats& operator+=(const tombstone_purge_stats& other) {
attempts += other.attempts;
failures_due_to_overlapping_with_memtable += other.failures_due_to_overlapping_with_memtable;
failures_due_to_overlapping_with_uncompacting_sstable += other.failures_due_to_overlapping_with_uncompacting_sstable;
return *this;
}
};
inline tombstone_purge_stats operator+(const tombstone_purge_stats& left, const tombstone_purge_stats& right) {
auto tmp = left;
tmp += right;
return tmp;
}