reduce logging during permission denied errors (#18641)

log them if any only once
This commit is contained in:
Harshavardhana
2023-12-12 16:11:17 -08:00
committed by GitHub
parent 946b070744
commit d521c84d55
3 changed files with 11 additions and 10 deletions

View File

@@ -2275,6 +2275,7 @@ func (s *xlStorage) RenameData(ctx context.Context, srcVolume, srcPath string, f
errDiskNotFound,
errUnformattedDisk,
errMaxVersionsExceeded,
errFileAccessDenied,
}
if err != nil && !IsErr(err, ignoredErrs...) && !contextCanceled(ctx) {
// Only log these errors if context is not yet canceled.
@@ -2282,7 +2283,7 @@ func (s *xlStorage) RenameData(ctx context.Context, srcVolume, srcPath string, f
s.drivePath,
srcVolume, srcPath,
dstVolume, dstPath,
err), "xl-storage-rename-data-"+srcVolume+"-"+dstVolume)
err), "xl-storage-rename-data-"+dstVolume)
}
if err == nil && s.globalSync {
globalSync()