Log errors returned from failed compactions

pull/4580/head
Jason Wilder 2015-10-26 10:37:09 -06:00
parent 562ccb6492
commit 6240972121
1 changed files with 10 additions and 2 deletions

View File

@ -204,7 +204,11 @@ func (e *Engine) PerformMaintenance() {
}
}
go e.Compact(true)
go func() {
if err := e.Compact(true); err != nil {
e.logger.Printf("PerformMaintenance: error during compaction: %v", err)
}
}()
}
// Format returns the format type of this engine
@ -482,7 +486,11 @@ func (e *Engine) Write(pointsByKey map[string]Values, measurementFieldsToSave ma
}
if !e.SkipCompaction && e.shouldCompact() {
go e.Compact(false)
go func() {
if err := e.Compact(false); err != nil {
e.logger.Printf("Write: error during compaction: %v", err)
}
}()
}
return nil