From 1c392d005794953d3ffed5fea48d974d31fab6f9 Mon Sep 17 00:00:00 2001 From: naivewong <867245430@qq.com> Date: Thu, 21 Mar 2019 17:21:50 +0800 Subject: [PATCH] Update wal.md that the first wal entry includes only base id and timestamp without a value (#562) Signed-off-by: naivewong <867245430@qq.com> --- docs/format/wal.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/format/wal.md b/docs/format/wal.md index 7195e0bdfb..af2ec61426 100644 --- a/docs/format/wal.md +++ b/docs/format/wal.md @@ -54,14 +54,16 @@ Series records encode the labels that identifies a series and its unique ID. Sample records encode samples as a list of triples `(series_id, timestamp, value)`. Series reference and timestamp are encoded as deltas w.r.t the first sample. +The first row stores the starting id and the starting timestamp. +The first sample record begins at the second row. ``` ┌──────────────────────────────────────────────────────────────────┐ │ type = 2 <1b> │ ├──────────────────────────────────────────────────────────────────┤ -│ ┌────────────────────┬───────────────────────────┬─────────────┐ │ -│ │ id <8b> │ timestamp <8b> │ value <8b> │ │ -│ └────────────────────┴───────────────────────────┴─────────────┘ │ +│ ┌────────────────────┬───────────────────────────┐ │ +│ │ id <8b> │ timestamp <8b> │ │ +│ └────────────────────┴───────────────────────────┘ │ │ ┌────────────────────┬───────────────────────────┬─────────────┐ │ │ │ id_delta │ timestamp_delta │ value <8b> │ │ │ └────────────────────┴───────────────────────────┴─────────────┘ │