diff options
author | jannaerin <golden.janna@gmail.com> | 2019-07-18 00:23:44 -0400 |
---|---|---|
committer | jannaerin <golden.janna@gmail.com> | 2019-08-08 17:32:26 -0400 |
commit | a70f6ddb8817f7b77b4597bba1a854548c4dbf12 (patch) | |
tree | 62e2a4ad3a2b179bddadc8331dd63808a430ef5f /src/mongo/db/s | |
parent | d101a617bada9252a4f0a29b8f615ee62abb979b (diff) | |
download | mongo-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.cpp | 8 |
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()) { |