lib/fs: reduce the frequency of failed to remove directory ... due to NFS lock log warnings

Log `failed to remove directory ... due to NFS lock` warning only if the directory cannot be removed in one second.
This commit is contained in:
Aliaksandr Valialkin 2021-03-18 13:23:41 +02:00
parent 540c00f2a0
commit e03233f441

View file

@ -81,7 +81,7 @@ func dirRemover() {
time.Sleep(sleepTime)
if sleepTime < maxSleepTime {
sleepTime *= 2
} else {
} else if sleepTime > time.Second {
logger.Warnf("failed to remove directory %q due to NFS lock; retrying later in %.3f seconds", w.path, sleepTime.Seconds())
}
}