summaryrefslogtreecommitdiff
path: root/src/mongo/db/service_entry_point_common.cpp
diff options
context:
space:
mode:
authorAllison Easton <allison.easton@mongodb.com>2021-08-18 14:43:22 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-08-18 15:24:15 +0000
commit0a7641e69031fcfdf25a1780a3b62bca5f59d68f (patch)
tree61d1cf34f36d2250c61b6af584a76d82a2b1d128 /src/mongo/db/service_entry_point_common.cpp
parent993a1658d6ef071d2d3859ad0357dff914da74fa (diff)
downloadmongo-0a7641e69031fcfdf25a1780a3b62bca5f59d68f.tar.gz
SERVER-59177 Remove deprecated ComparableDatabaseVersion::_uuidDisambiguatingSequenceNum
Diffstat (limited to 'src/mongo/db/service_entry_point_common.cpp')
-rw-r--r--src/mongo/db/service_entry_point_common.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mongo/db/service_entry_point_common.cpp b/src/mongo/db/service_entry_point_common.cpp
index 209422378a6..e8a4bd8ef7c 100644
--- a/src/mongo/db/service_entry_point_common.cpp
+++ b/src/mongo/db/service_entry_point_common.cpp
@@ -1576,14 +1576,14 @@ Future<void> ExecCommandDatabase::_commandExec() {
!_refreshedDatabase) {
auto sce = s.extraInfo<StaleDbRoutingVersion>();
invariant(sce);
- // TODO SERVER-59177 refresh only if wantedVersion is empty or less then
- // received
- const auto refreshed = _execContext->behaviors->refreshDatabase(opCtx, *sce);
- if (refreshed) {
- _refreshedDatabase = true;
- if (!opCtx->isContinuingMultiDocumentTransaction()) {
- _resetLockerStateAfterShardingUpdate(opCtx);
- return _commandExec();
+ if (sce->getVersionWanted() < sce->getVersionReceived()) {
+ const auto refreshed = _execContext->behaviors->refreshDatabase(opCtx, *sce);
+ if (refreshed) {
+ _refreshedDatabase = true;
+ if (!opCtx->isContinuingMultiDocumentTransaction()) {
+ _resetLockerStateAfterShardingUpdate(opCtx);
+ return _commandExec();
+ }
}
}
}