pub enum SinglePartitionCompaction {
DefinitelyAbsent,
IndexUnavailable,
Rows(Vec<CompactionRow>),
}Expand description
Outcome of a single-partition candidate probe against one SSTable.
The three-way absence-vs-failure invariant (roborev, issue #2207 — state this here, not just in prose elsewhere, since it is the correctness spine every caller relies on):
DefinitelyAbsentis returned ONLY on an exact presence-oracle negative (a bloommight_contain == false, or a BTI trie miss) — the ONE case that may prune a candidate SSTable from the read.IndexUnavailableis returned for EVERY OTHER kind of resolution/read anomaly: no random-access index at all, an inconclusive BIG Index.db miss (#1572), an unreadable/corrupt index (a BTI trie parse error or an Index.db read error — roborev IMPORTANT-1), an un-boundable last partition, or a resolved offset the materialized window never reached (a bad end bound / truncated-SSTable shape — roborev MEDIUM). None of these may EVER collapse toDefinitelyAbsentor an emptyRows— only a genuine, fully-materialized decode may report absence.Rowsis returned only once a seek has been FULLY EXECUTED (the window reached and covered the target partition’s bytes end-to-end) — an emptyVechere means a confirmed prefix-collision candidate for an absent key, decoded and verified, not “we could not tell.”
Variants§
DefinitelyAbsent
The presence oracle proved the key is definitively absent from this
SSTable (an exact bloom negative, or a BTI trie miss). The candidate is
pruned; cqlite.read.sstables_pruned was already incremented by the
oracle. Never returned when presence is positive, unknown, or the index is
missing.
The key MIGHT be present but this SSTable has no usable random-access index (Summary/Index absent, a #1572-style inconclusive index miss, an unreadable/corrupt index, or a resolved offset the window never reached). The caller MUST read this SSTable — scanning its partitions and filtering to the key — never skip it. Degrades speed, never correctness (#2295).
Rows(Vec<CompactionRow>)
The partition was seeked and decoded. rows are its compaction rows
(tombstones preserved), byte-identical to the full-scan stream restricted
to this partition. Empty when the resolved candidate was a prefix-collision
for an absent key (authoritative empty — do NOT fall back).