Merge pull request #8317 from ArthurSens/fuzzit_todo

Change seconds()*1000 to milliseconds()
This commit is contained in:
Julien Pivotto 2020-12-25 17:03:49 +01:00 committed by GitHub
commit a033845d87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -840,8 +840,7 @@ func (db *DB) Compact() (returnErr error) {
} }
compactionDuration := time.Since(start) compactionDuration := time.Since(start)
// TODO: change to milliseconds once fuzzit tests are removed if compactionDuration.Milliseconds() > db.head.chunkRange.Load() {
if int64(compactionDuration.Seconds())*1000 > db.head.chunkRange.Load() {
level.Warn(db.logger).Log( level.Warn(db.logger).Log(
"msg", "Head compaction took longer than the block time range, compactions are falling behind and won't be able to catch up", "msg", "Head compaction took longer than the block time range, compactions are falling behind and won't be able to catch up",
"duration", compactionDuration.String(), "duration", compactionDuration.String(),