mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-27 22:49:40 -08:00
b4c7c80227
https://en.wikipedia.org/wiki/Bit_numbering#Least_significant_bit Signed-off-by: Catalin Patulea <catalinp@google.com>
1.4 KiB
1.4 KiB
Chunks Disk Format
The following describes the format of a single chunks file, which is created in the chunks/
directory of a block. The maximum size per segment file is 512MiB.
Chunks in the files are referenced from the index by uint64 composed of in-file offset (lower 4 bytes) and segment sequence number (upper 4 bytes).
┌────────────────────────────────────────┬──────────────────────┐
│ magic(0x85BD40DD) <4 byte> │ version(1) <1 byte> │
├────────────────────────────────────────┴──────────────────────┤
│ ┌───────────────┬───────────────────┬──────┬────────────────┐ │
│ │ len <uvarint> │ encoding <1 byte> │ data │ CRC32 <4 byte> │ │
│ └───────────────┴───────────────────┴──────┴────────────────┘ │
└───────────────────────────────────────────────────────────────┘