mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 22:19:40 -08:00
44e9ae38b5
* Expose Stone as it is used in an exported method. * Move from tombstoneReader to []Stone for the same reason as above. * Make WAL reading a little cleaner. Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
32 lines
2.1 KiB
Markdown
32 lines
2.1 KiB
Markdown
# Tombstones Disk Format
|
|
|
|
The following describes the format of a tombstones file, which is placed
|
|
at the top level directory of a block.
|
|
|
|
The last 8 bytes specifies the offset to the start of Stones section.
|
|
The stones section is 0 padded to a multiple of 4 for fast scans.
|
|
|
|
```
|
|
┌────────────────────────────┬─────────────────────┐
|
|
│ magic(0x130BA30) <4b> │ version(1) <1 byte> │
|
|
├────────────────────────────┴─────────────────────┤
|
|
│ ┌──────────────────────────────────────────────┐ │
|
|
│ │ Tombstone 1 │ │
|
|
│ ├──────────────────────────────────────────────┤ │
|
|
│ │ ... │ │
|
|
│ ├──────────────────────────────────────────────┤ │
|
|
│ │ Tombstone N │ │
|
|
│ ├──────────────────────────────────────────────┤ │
|
|
│ │ CRC<4b> │ │
|
|
│ └──────────────────────────────────────────────┘ │
|
|
└──────────────────────────────────────────────────┘
|
|
```
|
|
|
|
# Tombstone
|
|
|
|
```
|
|
┌─────────────┬───────────────┬──────────────┐
|
|
│ref <varint> │ mint <varint> │ maxt <varint>│
|
|
└─────────────┴───────────────┴──────────────┘
|
|
```
|