From 29db842551e2c032567406be94ba6575b5f997e2 Mon Sep 17 00:00:00 2001 From: Gregory Wlodarek Date: Tue, 7 May 2019 08:50:35 -0400 Subject: SERVER-14396 Issue periodic warnings to the log while instance is locked --- src/mongo/db/commands/fsync.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mongo/db/commands/fsync.cpp') diff --git a/src/mongo/db/commands/fsync.cpp b/src/mongo/db/commands/fsync.cpp index e1ca6e4cc1e..abc04dfd2e3 100644 --- a/src/mongo/db/commands/fsync.cpp +++ b/src/mongo/db/commands/fsync.cpp @@ -387,7 +387,9 @@ void FSyncLockThread::run() { fsyncCmd.acquireFsyncLockSyncCV.notify_one(); while (fsyncCmd.getLockCount_inLock() > 0) { - fsyncCmd.releaseFsyncLockSyncCV.wait(lk); + warning() << "WARNING: instance is locked, blocking all writes. The fsync command has " + "finished execution, remember to unlock the instance using fsyncUnlock()."; + fsyncCmd.releaseFsyncLockSyncCV.wait_for(lk, Seconds(60).toSystemDuration()); } if (successfulFsyncLock) { -- cgit v1.2.1