cache: enable internal tests and fix race condition for them (#1928)

This commit is contained in:
remusb 2017-12-19 15:37:38 +02:00 committed by GitHub
parent 6f1ae00c7f
commit ebbe77f525
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -528,6 +528,10 @@ func (b *Persistent) CleanChunksBySize(maxSize int64) {
})
if err != nil {
if err == bolt.ErrDatabaseNotOpen {
// we're likely a late janitor and we need to end quietly as there's no guarantee of what exists anymore
return
}
fs.Errorf("cache", "cleanup failed: %v", err)
}
}