refine comments of Checkpoint function (#9655)

Signed-off-by: chenlujjj <953546398@qq.com>
This commit is contained in:
chenlujjj 2021-11-06 17:39:16 +08:00 committed by GitHub
parent 789274bf9c
commit d18e42c650
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {