diff options
author | Kevin Pulo <kevin.pulo@mongodb.com> | 2020-09-15 11:44:54 +1000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-09-17 04:31:08 +0000 |
commit | 686ee776666ebcfa15f3744142f74b6f1d59e617 (patch) | |
tree | 4b03cae9999243359291acc931eaae8daa2b5869 /src/mongo/db/read_concern_mongod.cpp | |
parent | 8213debcbf8b9495c0e336d98a8bf75df7f088c5 (diff) | |
download | mongo-686ee776666ebcfa15f3744142f74b6f1d59e617.tar.gz |
SERVER-48433 Remove LogicalClock facade
Diffstat (limited to 'src/mongo/db/read_concern_mongod.cpp')
-rw-r--r-- | src/mongo/db/read_concern_mongod.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/read_concern_mongod.cpp b/src/mongo/db/read_concern_mongod.cpp index 30b76024344..f9eba2ad488 100644 --- a/src/mongo/db/read_concern_mongod.cpp +++ b/src/mongo/db/read_concern_mongod.cpp @@ -34,7 +34,6 @@ #include "mongo/db/catalog_raii.h" #include "mongo/db/concurrency/write_conflict_exception.h" #include "mongo/db/curop_failpoint_helpers.h" -#include "mongo/db/logical_clock.h" #include "mongo/db/op_observer.h" #include "mongo/db/operation_context.h" #include "mongo/db/read_concern.h" @@ -45,6 +44,7 @@ #include "mongo/db/s/sharding_state.h" #include "mongo/db/server_options.h" #include "mongo/db/storage/recovery_unit.h" +#include "mongo/db/vector_clock.h" #include "mongo/logv2/log.h" #include "mongo/s/grid.h" #include "mongo/util/concurrency/notification.h" @@ -334,14 +334,14 @@ Status waitForReadConcernImpl(OperationContext* opCtx, << " readConcern without replication enabled"}; } - auto currentTime = LogicalClock::get(opCtx)->getClusterTime(); - if (currentTime < *targetClusterTime) { + const auto currentTime = VectorClock::get(opCtx)->getTime(); + if (currentTime.clusterTime() < *targetClusterTime) { return {ErrorCodes::InvalidOptions, str::stream() << "readConcern " << readConcernName << " value must not be greater than the current clusterTime. " "Requested clusterTime: " - << targetClusterTime->toString() - << "; current clusterTime: " << currentTime.toString()}; + << targetClusterTime->toString() << "; current clusterTime: " + << currentTime.clusterTime().toString()}; } auto status = makeNoopWriteIfNeeded(opCtx, *targetClusterTime); |