merge object lifecycle checks into usage crawler (#9579)

This commit is contained in:
Klaus Post
2020-06-12 10:28:21 -07:00
committed by GitHub
parent 225b812b5e
commit 43d6e3ae06
18 changed files with 1400 additions and 852 deletions
+6 -3
View File
@@ -261,6 +261,7 @@ func (z *xlZones) CrawlAndGetDataUsage(ctx context.Context, bf *bloomFilter, upd
// Start crawler. Blocks until done.
err := xl.crawlAndGetDataUsage(ctx, buckets, bf, updates)
if err != nil {
logger.LogIf(ctx, err)
mu.Lock()
if firstErr == nil {
firstErr = err
@@ -313,9 +314,11 @@ func (z *xlZones) CrawlAndGetDataUsage(ctx context.Context, bf *bloomFilter, upd
wg.Wait()
ch := make(chan struct{})
updateCloser <- ch
<-ch
select {
case updateCloser <- ch:
<-ch
case <-ctx.Done():
}
return firstErr
}