Recreate bucket metacache if corrupted (#10800)

If bucket metadata cannot be read, clean up existing and create a new.
This commit is contained in:
Klaus Post
2020-10-31 10:26:16 -07:00
committed by GitHub
parent 422898d9b3
commit fe9f23e632
2 changed files with 33 additions and 6 deletions

View File

@@ -45,7 +45,7 @@ const metacacheManagerTransientBucket = "**transient**"
// initManager will start async saving the cache.
func (m *metacacheManager) initManager() {
// Add a transient bucket.
tb := newBucketMetacache(metacacheManagerTransientBucket)
tb := newBucketMetacache(metacacheManagerTransientBucket, false)
tb.transient = true
m.buckets[metacacheManagerTransientBucket] = tb