From b17d2587904571cb837a2be625a2d9d2ce296d89 Mon Sep 17 00:00:00 2001 From: Judah Schvimer Date: Wed, 4 Jan 2017 16:23:03 -0500 Subject: SERVER-27154 replSetRequestVotes command should wait for durability (cherry picked from commit 8378a0dfc2ddbf2043b923e8c25362a797a2c120) --- src/mongo/db/repl/replication_coordinator_external_state_impl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp index 128e18b9f53..0b951fbe41b 100644 --- a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp +++ b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp @@ -316,11 +316,11 @@ Status ReplicationCoordinatorExternalStateImpl::storeLocalLastVoteDocument( ScopedTransaction transaction(txn, MODE_IX); Lock::DBLock dbWriteLock(txn->lockState(), lastVoteDatabaseName, MODE_X); Helpers::putSingleton(txn, lastVoteCollectionName, lastVoteObj); - return Status::OK(); } MONGO_WRITE_CONFLICT_RETRY_LOOP_END( txn, "save replica set lastVote", lastVoteCollectionName); - MONGO_UNREACHABLE; + txn->recoveryUnit()->waitUntilDurable(); + return Status::OK(); } catch (const DBException& ex) { return ex.toStatus(); } -- cgit v1.2.1