diff options
author | Brian DeLeonardis <brian.deleonardis@mongodb.com> | 2020-10-16 21:46:16 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-10-26 21:10:38 +0000 |
commit | c0b9b346586b4b7c97fde38ea97a98a42da0b572 (patch) | |
tree | 1d80189680d251c7fce178ecb7ff429ad5251c4d /src/mongo/db/read_concern_mongod.cpp | |
parent | 4e93e490d4de7c50871cfd80864817fe389ae718 (diff) | |
download | mongo-c0b9b346586b4b7c97fde38ea97a98a42da0b572.tar.gz |
SERVER-47752 Refactor kMajorityCommitted to not receive special treatment
Diffstat (limited to 'src/mongo/db/read_concern_mongod.cpp')
-rw-r--r-- | src/mongo/db/read_concern_mongod.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/mongo/db/read_concern_mongod.cpp b/src/mongo/db/read_concern_mongod.cpp index 0ee34f808b1..077b486ef44 100644 --- a/src/mongo/db/read_concern_mongod.cpp +++ b/src/mongo/db/read_concern_mongod.cpp @@ -421,13 +421,13 @@ Status waitForReadConcernImpl(OperationContext* opCtx, "readConcernArgs"_attr = readConcernArgs); ru->setTimestampReadSource(RecoveryUnit::ReadSource::kMajorityCommitted); - Status status = ru->obtainMajorityCommittedSnapshot(); + Status status = ru->majorityCommittedSnapshotAvailable(); // Wait until a snapshot is available. while (status == ErrorCodes::ReadConcernMajorityNotAvailableYet) { LOGV2_DEBUG(20992, debugLevel, "Snapshot not available yet."); replCoord->waitUntilSnapshotCommitted(opCtx, Timestamp()); - status = ru->obtainMajorityCommittedSnapshot(); + status = ru->majorityCommittedSnapshotAvailable(); } if (!status.isOK()) { @@ -436,11 +436,8 @@ Status waitForReadConcernImpl(OperationContext* opCtx, LOGV2_DEBUG(20993, debugLevel, - "Using 'committed' snapshot: {CurOp_get_opCtx_opDescription} with readTs: " - "{opCtx_recoveryUnit_getPointInTimeReadTimestamp}", - "CurOp_get_opCtx_opDescription"_attr = CurOp::get(opCtx)->opDescription(), - "opCtx_recoveryUnit_getPointInTimeReadTimestamp"_attr = - ru->getPointInTimeReadTimestamp()); + "Using 'committed' snapshot", + "operation_description"_attr = CurOp::get(opCtx)->opDescription()); } return Status::OK(); } |