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:
| Module | Responsibility |
|---|---|
toc | table of contents: section offsets, bounds and ordering |
symbols | symbol table (v1 inline refs, v2/v3 offset groups) |
series | series records, chunk metadata, sequential iterator |
postings | postings lists, label names/values, sorted unions |
validation | section 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§
- Chunk
Meta - Where one chunk lives and which time range it covers.
- Index
Reader - Reader for the index of one block.
- Index
Stats - Series and chunk counts, plus the byte range they were read from.
- Series
Iter - Iterator over the series section, in on-disk (label-sorted) order.
- Series
Ref - One series: its label set and the chunks that hold its samples.
- Toc
- The index table of contents: absolute file offsets of every section.