Fix crash in console logger and also handle bucket DNS updates (#8654)

Also fix listenBucketNotification bugs seen by minio-js
listen bucket notification API.
This commit is contained in:
Harshavardhana
2019-12-16 20:30:57 -08:00
committed by kannappanr
parent 842d0241ed
commit c8d82588c2
19 changed files with 208 additions and 273 deletions

View File

@@ -68,7 +68,13 @@ func runDataUsageInfoForFS(ctx context.Context, fsObj *FSObjects, endCh <-chan s
// Save the data usage in the disk
err := storeDataUsageInBackend(ctx, fsObj, usageInfo)
if err != nil {
logger.LogIf(ctx, err)
if globalWORMEnabled {
if _, ok := err.(ObjectAlreadyExists); !ok {
logger.LogIf(ctx, err)
}
} else {
logger.LogIf(ctx, err)
}
}
select {
case <-endCh:
@@ -97,7 +103,13 @@ func runDataUsageInfoForXLZones(ctx context.Context, z *xlZones, endCh <-chan st
usageInfo := z.crawlAndGetDataUsage(ctx, endCh)
err := storeDataUsageInBackend(ctx, z, usageInfo)
if err != nil {
logger.LogIf(ctx, err)
if globalWORMEnabled {
if _, ok := err.(ObjectAlreadyExists); !ok {
logger.LogIf(ctx, err)
}
} else {
logger.LogIf(ctx, err)
}
}
select {
case <-endCh: