Skip to main content

StatsExtras

Struct StatsExtras 

Source
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: i64

SSTable 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

Source§

fn clone(&self) -> StatsExtras

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StatsExtras

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for StatsExtras

Source§

fn default() -> Self

The default reported when no STATS component is locatable: “no tombstones” max-LDT ([NO_DELETION_TIME]), an empty histogram, and no authoritative maxTimestamp (fail-closed None).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more