IndexCoverage

How much of a store an index can answer for, at one snapshot.

Three counters where CatalogCoverage has two, and the third is the important one. A segment is stale when the index over it is complete and correct and nonetheless unusable at this snapshot: an observation reports only the newest version of each key, but a segment may hold several versions of one key whenever an older snapshot pinned them, and a reader older than the segment's largest sequence is entitled to see a version the index never recorded. The guard is exact — an index over a segment is sound at snapshot S if and only if S.sequence is at or above that segment's largest sequence — and a segment that fails it is scanned instead.

That is the same mechanism as a segment with no sidecar at all: one concept, two causes, both ending in "the caller scans this one". Which is why an index is usable while it is still being built, with no cutover — a half-built index is simply an index with low coverage.

Properties

Link copied to clipboard

Covered share of the live segments, 1.0 for a store with none.

Link copied to clipboard

Whether every live segment is covered and usable.

Link copied to clipboard

Segments this index can answer for at this snapshot.

Link copied to clipboard

Segments with a complete index that this snapshot is too old to use.

Link copied to clipboard

Live segments in total.

Link copied to clipboard

Segments the caller has to scan: the ones missing an index and the ones too new for it.

Functions

Link copied to clipboard
open override fun toString(): String