summaryrefslogtreecommitdiff
path: root/src/mongo/db/rs_local_client.cpp
diff options
context:
space:
mode:
authorBrian DeLeonardis <brian.deleonardis@mongodb.com>2020-10-16 21:46:16 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-10-26 21:10:38 +0000
commitc0b9b346586b4b7c97fde38ea97a98a42da0b572 (patch)
tree1d80189680d251c7fce178ecb7ff429ad5251c4d /src/mongo/db/rs_local_client.cpp
parent4e93e490d4de7c50871cfd80864817fe389ae718 (diff)
downloadmongo-c0b9b346586b4b7c97fde38ea97a98a42da0b572.tar.gz
SERVER-47752 Refactor kMajorityCommitted to not receive special treatment
Diffstat (limited to 'src/mongo/db/rs_local_client.cpp')
-rw-r--r--src/mongo/db/rs_local_client.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/rs_local_client.cpp b/src/mongo/db/rs_local_client.cpp
index 253efa13eca..41d5ed47cc7 100644
--- a/src/mongo/db/rs_local_client.cpp
+++ b/src/mongo/db/rs_local_client.cpp
@@ -103,7 +103,7 @@ StatusWith<Shard::QueryResponse> RSLocalClient::queryOnce(
if (readConcernLevel == repl::ReadConcernLevel::kMajorityReadConcern) {
// Set up operation context with majority read snapshot so correct optime can be retrieved.
opCtx->recoveryUnit()->setTimestampReadSource(RecoveryUnit::ReadSource::kMajorityCommitted);
- Status status = opCtx->recoveryUnit()->obtainMajorityCommittedSnapshot();
+ Status status = opCtx->recoveryUnit()->majorityCommittedSnapshotAvailable();
// Wait for any writes performed by this ShardLocal instance to be committed and visible.
Status readConcernStatus = replCoord->waitUntilOpTimeForRead(
@@ -114,7 +114,7 @@ StatusWith<Shard::QueryResponse> RSLocalClient::queryOnce(
// Inform the storage engine to read from the committed snapshot for the rest of this
// operation.
- status = opCtx->recoveryUnit()->obtainMajorityCommittedSnapshot();
+ status = opCtx->recoveryUnit()->majorityCommittedSnapshotAvailable();
if (!status.isOK()) {
return status;
}