summaryrefslogtreecommitdiff
path: root/src/mongo/db/s
diff options
context:
space:
mode:
authorjannaerin <golden.janna@gmail.com>2019-07-18 00:23:44 -0400
committerjannaerin <golden.janna@gmail.com>2019-08-08 17:32:26 -0400
commita70f6ddb8817f7b77b4597bba1a854548c4dbf12 (patch)
tree62e2a4ad3a2b179bddadc8331dd63808a430ef5f /src/mongo/db/s
parentd101a617bada9252a4f0a29b8f615ee62abb979b (diff)
downloadmongo-a70f6ddb8817f7b77b4597bba1a854548c4dbf12.tar.gz
SERVER-41949 Attach the databaseVersion on the write path on mongos"
Diffstat (limited to 'src/mongo/db/s')
-rw-r--r--src/mongo/db/s/scoped_operation_completion_sharding_actions.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/s/scoped_operation_completion_sharding_actions.cpp b/src/mongo/db/s/scoped_operation_completion_sharding_actions.cpp
index c75cba94c62..625f62a51f3 100644
--- a/src/mongo/db/s/scoped_operation_completion_sharding_actions.cpp
+++ b/src/mongo/db/s/scoped_operation_completion_sharding_actions.cpp
@@ -78,6 +78,14 @@ ScopedOperationCompletionShardingActions::~ScopedOperationCompletionShardingActi
if (!handleMismatchStatus.isOK())
log() << "Failed to handle stale version exception"
<< causedBy(redact(handleMismatchStatus));
+ } else if (auto staleInfo = status->extraInfo<StaleDbRoutingVersion>()) {
+ auto handleMismatchStatus = onDbVersionMismatchNoExcept(_opCtx,
+ staleInfo->getDb(),
+ staleInfo->getVersionReceived(),
+ staleInfo->getVersionWanted());
+ if (!handleMismatchStatus.isOK())
+ log() << "Failed to handle database version exception"
+ << causedBy(redact(handleMismatchStatus));
} else if (auto cannotImplicitCreateCollInfo =
status->extraInfo<CannotImplicitlyCreateCollectionInfo>()) {
if (ShardingState::get(_opCtx)->enabled()) {