From e03233f4411f1e4c29d5d75375ddabc8dcd737a4 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 18 Mar 2021 13:23:41 +0200 Subject: [PATCH] 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. --- lib/fs/dir_remover.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fs/dir_remover.go b/lib/fs/dir_remover.go index fae5701bb..7c343c251 100644 --- a/lib/fs/dir_remover.go +++ b/lib/fs/dir_remover.go @@ -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()) } }