diff options
author | Allison Easton <allison.easton@mongodb.com> | 2021-08-18 14:43:22 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-08-18 15:24:15 +0000 |
commit | 0a7641e69031fcfdf25a1780a3b62bca5f59d68f (patch) | |
tree | 61d1cf34f36d2250c61b6af584a76d82a2b1d128 /src/mongo/db/service_entry_point_common.cpp | |
parent | 993a1658d6ef071d2d3859ad0357dff914da74fa (diff) | |
download | mongo-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.cpp | 16 |
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(); + } } } } |