diff options
author | Judah Schvimer <judah@mongodb.com> | 2017-01-04 16:23:03 -0500 |
---|---|---|
committer | Judah Schvimer <judah@mongodb.com> | 2017-01-23 10:51:31 -0500 |
commit | b17d2587904571cb837a2be625a2d9d2ce296d89 (patch) | |
tree | 1f31f9536c241fe38a275bc665e6586cd8dbe708 | |
parent | a89275be8ed3401c3f00357b90720fcee94e3f79 (diff) | |
download | mongo-b17d2587904571cb837a2be625a2d9d2ce296d89.tar.gz |
SERVER-27154 replSetRequestVotes command should wait for durability
(cherry picked from commit 8378a0dfc2ddbf2043b923e8c25362a797a2c120)
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_external_state_impl.cpp | 4 |
1 files 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(); } |