From 298eddb82cad5cffaf764864375b250bc804d3cb Mon Sep 17 00:00:00 2001 From: Ben Johnson Date: Wed, 28 Nov 2018 11:20:18 -0700 Subject: [PATCH] Skip and warn series files in retention policy directory. --- tsdb/store.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tsdb/store.go b/tsdb/store.go index a2216873f8..39774d8d17 100644 --- a/tsdb/store.go +++ b/tsdb/store.go @@ -347,6 +347,12 @@ func (s *Store) loadShards() error { } for _, sh := range shardDirs { + // Series file should not be in a retention policy but skip just in case. + if sh.Name() == SeriesFileDirectory { + log.Warn("Skipping series file in retention policy dir", zap.String("path", filepath.Join(s.path, db.Name(), rp.Name()))) + continue + } + n++ go func(db, rp, sh string) { t.Take()