From d634785944e1416245c97c7d176601d9e57dbd50 Mon Sep 17 00:00:00 2001 From: Simon Pasquier Date: Wed, 17 Jun 2020 17:08:21 +0200 Subject: [PATCH] tsdb/docs: fix head chunks directory + link from README (#7309) Signed-off-by: Simon Pasquier --- tsdb/docs/format/README.md | 1 + tsdb/docs/format/head_chunks.md | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tsdb/docs/format/README.md b/tsdb/docs/format/README.md index 39db06fc5..5bd3d9882 100644 --- a/tsdb/docs/format/README.md +++ b/tsdb/docs/format/README.md @@ -2,5 +2,6 @@ * [Index](index.md) * [Chunks](chunks.md) +* [Head Chunks](head_chunks.md) * [Tombstones](tombstones.md) * [Wal](wal.md) diff --git a/tsdb/docs/format/head_chunks.md b/tsdb/docs/format/head_chunks.md index 5a320fa76..ed138f4b6 100644 --- a/tsdb/docs/format/head_chunks.md +++ b/tsdb/docs/format/head_chunks.md @@ -1,7 +1,7 @@ # Head Chunks on Disk Format -The following describes the format of a chunks file, -which is created in the `wal/chunks/` inside the data directory. +The following describes the format of a chunks file, which is created in the +`chunks_head/` directory inside the data directory. 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). @@ -27,10 +27,13 @@ in-file offset (lower 4 bytes) and segment sequence number (upper 4 bytes). # Chunk -Unlike chunks in the on-disk blocks, here we additionally store series reference that the chunks belongs to and the mint/maxt of the chunks. This is because we don't have an index associated with these chunks, hence these meta information are used while replaying the chunks. +Unlike chunks in the on-disk blocks, here we additionally store series +reference that the chunks belongs to and the mint/maxt of the chunks. This is +because we don't have an index associated with these chunks, hence these meta +information are used while replaying the chunks. ``` ┌─────────────────────┬───────────────────────┬───────────────────────┬───────────────────┬───────────────┬──────────────┬────────────────┐ | series ref <8 byte> | mint <8 byte, uint64> | maxt <8 byte, uint64> | encoding <1 byte> | len | data │ CRC32 <4 byte> │ └─────────────────────┴───────────────────────┴───────────────────────┴───────────────────┴───────────────┴──────────────┴────────────────┘ -``` \ No newline at end of file +```