Skip to main content

Module index

Module index 

Source
Expand description

Prometheus TSDB index reader (format v1/v2/v3).

Two access patterns share this reader. A sequential export walks the series section in lexicographic label order, which is also the physical order of their chunks in the segment files; IndexReader::series does that without touching any label index. A lookup-driven consumer asks for one label pair instead; IndexReader::postings serves that from a sampled view of the postings offset table, so no full label index is ever held in memory.

Module layout:

ModuleResponsibility
toctable of contents: section offsets, bounds and ordering
symbolssymbol table (v1 inline refs, v2/v3 offset groups)
seriesseries records, chunk metadata, sequential iterator
postingspostings lists, label names/values, sorted unions
validationsection boundary and layout checks

Re-exports§

pub use postings::Postings;
pub use postings::PostingsStats;

Modules§

postings
Postings lists and label lookups (index v1, v2 and v3).
validation
Structural validation of the index TOC and section boundaries.

Structs§

ChunkMeta
Where one chunk lives and which time range it covers.
IndexReader
Reader for the index of one block.
IndexStats
Series and chunk counts, plus the byte range they were read from.
SeriesIter
Iterator over the series section, in on-disk (label-sorted) order.
SeriesRef
One series: its label set and the chunks that hold its samples.
Toc
The index table of contents: absolute file offsets of every section.