diff options
author | Misha Tyulenev <misha@mongodb.com> | 2015-09-29 16:28:11 -0400 |
---|---|---|
committer | Misha Tyulenev <misha@mongodb.com> | 2015-09-29 16:51:21 -0400 |
commit | 30a3e0779904964675928d0b9f87876b721ecfa0 (patch) | |
tree | 9a14f606204f1c456c6337e2466fd1a3e92a6c38 /src/mongo/db/s/migration_source_manager.cpp | |
parent | 94709a960d436ee9b381b667e4e018875542eb3f (diff) | |
download | mongo-30a3e0779904964675928d0b9f87876b721ecfa0.tar.gz |
SERVER-20630 find command on mongod needs to wait until out of critical section
Diffstat (limited to 'src/mongo/db/s/migration_source_manager.cpp')
-rw-r--r-- | src/mongo/db/s/migration_source_manager.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/s/migration_source_manager.cpp b/src/mongo/db/s/migration_source_manager.cpp index 0bb2cec7f61..f497c3f4d3d 100644 --- a/src/mongo/db/s/migration_source_manager.cpp +++ b/src/mongo/db/s/migration_source_manager.cpp @@ -548,6 +548,9 @@ bool MigrationSourceManager::waitTillNotInCriticalSection(int maxSecondsToWait) const auto deadline = stdx::chrono::system_clock::now() + Seconds(maxSecondsToWait); stdx::unique_lock<stdx::mutex> lk(_mutex); while (_inCriticalSection) { + log() << "Waiting for " << maxSecondsToWait + << " seconds for the migration critical section to end"; + if (stdx::cv_status::timeout == _inCriticalSectionCV.wait_until(lk, deadline)) { return false; } |