fs: Handle no buckets (#12531)

Since total are sent after each bucket, deleting all would 
not make usage go to zero.
This commit is contained in:
Klaus Post 2021-06-18 10:41:36 -07:00 committed by GitHub
parent 908ccf40ba
commit 42ad12ebf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -251,6 +251,12 @@ func (fs *FSObjects) NSScanner(ctx context.Context, bf *bloomFilter, updates cha
if err != nil {
return err
}
if len(buckets) == 0 {
totalCache.keepBuckets(buckets)
updates <- totalCache.dui(dataUsageRoot, buckets)
return nil
}
totalCache.Info.BloomFilter = bf.bytes()
// Clear totals.