Skip and warn series files in retention policy directory.

pull/10525/head
Ben Johnson 2018-11-28 11:20:18 -07:00
parent 72283cd9c5
commit 298eddb82c
No known key found for this signature in database
GPG Key ID: 81741CD251883081
1 changed files with 6 additions and 0 deletions

View File

@ -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()