From 3274cac0d383025a45655977704a7aeea60aef19 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Fri, 15 Mar 2024 08:51:57 +0000 Subject: [PATCH] TSDB: remove unused function Was only used in old WAL implementation. Signed-off-by: Bryan Boreham --- tsdb/db.go | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/tsdb/db.go b/tsdb/db.go index 7aa68da50..33b7e8ab6 100644 --- a/tsdb/db.go +++ b/tsdb/db.go @@ -2225,23 +2225,6 @@ func sequenceFiles(dir string) ([]string, error) { return res, nil } -func nextSequenceFile(dir string) (string, int, error) { - files, err := os.ReadDir(dir) - if err != nil { - return "", 0, err - } - - i := uint64(0) - for _, f := range files { - j, err := strconv.ParseUint(f.Name(), 10, 64) - if err != nil { - continue - } - i = j - } - return filepath.Join(dir, fmt.Sprintf("%0.6d", i+1)), int(i + 1), nil -} - func exponential(d, min, max time.Duration) time.Duration { d *= 2 if d < min {