summaryrefslogtreecommitdiff
path: root/src/mongo/s/commands/strategy.cpp
diff options
context:
space:
mode:
authorKevin Pulo <kevin.pulo@mongodb.com>2020-09-15 11:44:54 +1000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-09-17 04:31:08 +0000
commit686ee776666ebcfa15f3744142f74b6f1d59e617 (patch)
tree4b03cae9999243359291acc931eaae8daa2b5869 /src/mongo/s/commands/strategy.cpp
parent8213debcbf8b9495c0e336d98a8bf75df7f088c5 (diff)
downloadmongo-686ee776666ebcfa15f3744142f74b6f1d59e617.tar.gz
SERVER-48433 Remove LogicalClock facade
Diffstat (limited to 'src/mongo/s/commands/strategy.cpp')
-rw-r--r--src/mongo/s/commands/strategy.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mongo/s/commands/strategy.cpp b/src/mongo/s/commands/strategy.cpp
index f83b490d0ef..558524ee17b 100644
--- a/src/mongo/s/commands/strategy.cpp
+++ b/src/mongo/s/commands/strategy.cpp
@@ -49,7 +49,6 @@
#include "mongo/db/initialize_api_parameters.h"
#include "mongo/db/initialize_operation_session_info.h"
#include "mongo/db/lasterror.h"
-#include "mongo/db/logical_clock.h"
#include "mongo/db/logical_session_id_helpers.h"
#include "mongo/db/logical_time_validator.h"
#include "mongo/db/matcher/extensions_callback_noop.h"
@@ -648,13 +647,13 @@ void runCommand(OperationContext* opCtx,
(!readConcernArgs.getArgsAtClusterTime() ||
readConcernArgs.wasAtClusterTimeSelected())) {
auto atClusterTime = [&] {
- auto latestKnownClusterTime = LogicalClock::get(opCtx)->getClusterTime();
+ const auto latestKnownTime = VectorClock::get(opCtx)->getTime();
// Choose a time after the user-supplied afterClusterTime.
auto afterClusterTime = readConcernArgs.getArgsAfterClusterTime();
- if (afterClusterTime && *afterClusterTime > latestKnownClusterTime) {
+ if (afterClusterTime && *afterClusterTime > latestKnownTime.clusterTime()) {
return afterClusterTime->asTimestamp();
}
- return latestKnownClusterTime.asTimestamp();
+ return latestKnownTime.clusterTime().asTimestamp();
}();
readConcernArgs.setArgsAtClusterTimeForSnapshot(atClusterTime);
}