pub struct StatsExtras {
pub max_local_deletion_time: i64,
pub tombstone_drop_times: Vec<(i64, u64)>,
pub max_timestamp: Option<i64>,
pub max_ttl: Option<i64>,
}Expand description
Additional STATS-component facts decoded by parse_stats_extras that are
not part of the repair-coordination metadata: the SSTable’s maximum local
deletion time and the estimated tombstone-drop-times histogram.
Decoded best-effort: a Statistics.db that parses today must keep parsing,
so callers treat an Err from parse_stats_extras as “leave the existing
placeholders” rather than propagating it.
Fields§
§max_local_deletion_time: i64SSTable maxLocalDeletionTime, normalized so that the version-specific
“no tombstones” sentinel (i32::MAX for nb, 0xFFFF_FFFF for oa/da)
maps to [NO_DELETION_TIME] (i64::MAX); any real deletion time is the
seconds-since-epoch value as i64.
tombstone_drop_times: Vec<(i64, u64)>estimatedTombstoneDropTime histogram as (point, count) pairs. Empty
when the histogram carries no bins (the common case for SSTables with no
tombstones).
max_timestamp: Option<i64>Authoritative SSTable maxTimestamp (write timestamp, microseconds)
decoded from STATS field 4 (issue #1729). None when the SSTable
carries no live timestamp — Cassandra’s MetadataCollector seeds the
tracker with Long.MIN_VALUE, so an on-disk value of i64::MIN is the
“no timestamps recorded” sentinel and is surfaced fail-closed as None
(consumers that require a real max — e.g. the #1388 drop gate — must NOT
proceed as if a max were known). Any other value is the true maximum.
This intentionally replaces the historical max_timestamp = min_timestamp
placeholder in crate::parser::enhanced_statistics_parser, which
silently reported the MIN write timestamp as the max.
max_ttl: Option<i64>Authoritative SSTable maxTTL (seconds) decoded from STATS field 9
(issue #1537). Cassandra’s MetadataCollector seeds the TTL tracker with
Cell.NO_TTL (0) and updates it only from EXPIRING cells, so a maxTTL of
0 means “no expiring cells” and is surfaced fail-closed as None. Any
positive value is the true maximum TTL across the SSTable’s expiring cells.
The compaction TTL-expiry LDT floor (issue #1537,
[crate::storage::write_engine::merge::compute_expiry_ttl_ldt_floor]) needs
this authoritative maximum: the enhanced (nb) parser only decodes the
EncodingStats minTTL baseline and honestly leaves max_ttl = None, so
this best-effort STATS-extras walk is the only source of the true maximum.
Trait Implementations§
Source§impl Clone for StatsExtras
impl Clone for StatsExtras
Source§fn clone(&self) -> StatsExtras
fn clone(&self) -> StatsExtras
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more