From d18e42c650a99e40c160bf2fc78825c40c321da5 Mon Sep 17 00:00:00 2001 From: chenlujjj <953546398@qq.com> Date: Sat, 6 Nov 2021 17:39:16 +0800 Subject: [PATCH] refine comments of Checkpoint function (#9655) Signed-off-by: chenlujjj <953546398@qq.com> --- tsdb/wal/checkpoint.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tsdb/wal/checkpoint.go b/tsdb/wal/checkpoint.go index 80c0c1036..780aa2daf 100644 --- a/tsdb/wal/checkpoint.go +++ b/tsdb/wal/checkpoint.go @@ -82,9 +82,9 @@ func DeleteCheckpoints(dir string, maxIndex int) error { const checkpointPrefix = "checkpoint." -// Checkpoint creates a compacted checkpoint of segments in range [first, last] in the given WAL. +// Checkpoint creates a compacted checkpoint of segments in range [from, to] in the given WAL. // It includes the most recent checkpoint if it exists. -// All series not satisfying keep and samples below mint are dropped. +// All series not satisfying keep and samples/tombstones/exemplars below mint are dropped. // // The checkpoint is stored in a directory named checkpoint.N in the same // segmented format as the original WAL itself. @@ -97,7 +97,6 @@ func Checkpoint(logger log.Logger, w *WAL, from, to int, keep func(id uint64) bo level.Info(logger).Log("msg", "Creating checkpoint", "from_segment", from, "to_segment", to, "mint", mint) { - var sgmRange []SegmentRange dir, idx, err := LastCheckpoint(w.Dir()) if err != nil && err != record.ErrNotFound {