summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
diff options
context:
space:
mode:
authorJudah Schvimer <judah@mongodb.com>2017-01-04 16:23:03 -0500
committerJudah Schvimer <judah@mongodb.com>2017-01-04 16:23:03 -0500
commit8378a0dfc2ddbf2043b923e8c25362a797a2c120 (patch)
tree14ee42afab7e9422a1f6ba7cc4494b893256d4d9 /src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
parent653899b2e9da7ee8f1724280de4c6390a63d3b1b (diff)
downloadmongo-8378a0dfc2ddbf2043b923e8c25362a797a2c120.tar.gz
SERVER-27154 replSetRequestVotes command should wait for durability
Diffstat (limited to 'src/mongo/db/repl/replication_coordinator_external_state_impl.cpp')
-rw-r--r--src/mongo/db/repl/replication_coordinator_external_state_impl.cpp4
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 d26601ed0d9..769b910aa32 100644
--- a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
@@ -548,11 +548,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();
}