mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
Log disk not found error just once (#6059)
Modified the LogIf function to log only if the error passed is not on the ignored errors list. Currently, only disk not found error is added to the list. Added a new function in logger package called LogAlwaysIf, which will print on any error. Fixes #5997
This commit is contained in:
committed by
Harshavardhana
parent
ff29aed05d
commit
0286e61aee
@@ -103,7 +103,6 @@ func commitXLMetadata(ctx context.Context, disks []StorageAPI, srcBucket, srcPre
|
||||
// Rename `xl.json` to all disks in parallel.
|
||||
for index, disk := range disks {
|
||||
if disk == nil {
|
||||
logger.LogIf(ctx, errDiskNotFound)
|
||||
mErrs[index] = errDiskNotFound
|
||||
continue
|
||||
}
|
||||
@@ -791,7 +790,6 @@ func (xl xlObjects) cleanupUploadedParts(ctx context.Context, uploadIDPath strin
|
||||
// Cleanup uploadID for all disks.
|
||||
for index, disk := range xl.getDisks() {
|
||||
if disk == nil {
|
||||
logger.LogIf(ctx, errDiskNotFound)
|
||||
errs[index] = errDiskNotFound
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user