From f30b00c24f64e0b5cd7c2357e11f809587af68bb Mon Sep 17 00:00:00 2001 From: Jason Wilder Date: Tue, 18 Oct 2016 15:33:39 -0600 Subject: [PATCH] Skip cleanup if dir does not exist --- tsdb/engine/tsm1/engine.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tsdb/engine/tsm1/engine.go b/tsdb/engine/tsm1/engine.go index ba31cfc51b..13f9e3f874 100644 --- a/tsdb/engine/tsm1/engine.go +++ b/tsdb/engine/tsm1/engine.go @@ -1149,7 +1149,9 @@ func (e *Engine) reloadCache() error { func (e *Engine) cleanup() error { allfiles, err := ioutil.ReadDir(e.path) - if err != nil { + if os.IsNotExist(err) { + return nil + } else if err != nil { return err }