tsdb: update chunks format (#6033)

Signed-off-by: zhulongcheng <zhulongcheng.dev@gmail.com>
This commit is contained in:
zhulongcheng 2019-09-19 18:56:32 +08:00 committed by Krasi Georgiev
parent 3344bb5c33
commit e081406b5b
1 changed files with 15 additions and 11 deletions

View File

@ -8,17 +8,21 @@ 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). in-file offset (lower 4 bytes) and segment sequence number (upper 4 bytes).
``` ```
┌────────────────────────────┬─────────────────────┐ ┌──────────────────────────────┐
│ magic(0x85BD40DD) <4 byte> │ version(1) <1 byte> │ magic(0x85BD40DD) <4 byte>
├────────────────────────────┴─────────────────────┤ ├──────────────────────────────┤
│ ┌──────────────────────────────────────────────┐ │ │ version(1) <1 byte>
│ │ Chunk 1 │ │ ├──────────────────────────────┤
│ ├──────────────────────────────────────────────┤ │ │ padding(0) <3 byte>
│ │ ... │ │ ├──────────────────────────────┤
│ ├──────────────────────────────────────────────┤ │ │ ┌──────────────────────────┐ │
│ │ Chunk N │ │ │ │ Chunk 1 │ │
│ └──────────────────────────────────────────────┘ │ │ ├──────────────────────────┤ │
└──────────────────────────────────────────────────┘ │ │ ... │ │
│ ├──────────────────────────┤ │
│ │ Chunk N │ │
│ └──────────────────────────┘ │
└──────────────────────────────┘
``` ```