...
The retried call to _commandExec() may cause a shard to return a NoSuchTransaction error response instead of its original StaleShardVersionError error response despite the router having been stale. Masking the original StaleConfig exception this way prevents the router from ever finding out it was stale. This behavior can lead a multi-statement transaction to perpetually be retried by the client and never succeed until the mongos refreshes for some other reason. The calls to _commandExec() should be guarded by !opCtx->inMultiDocumentTransaction() similar to what was done for ShardCannotRefreshDueToLocksHeld. https://github.com/mongodb/mongo/blob/2cc51d1d39270a8145757debb5578057ef87ff71/src/mongo/db/service_entry_point_common.cpp#L1645 https://github.com/mongodb/mongo/blob/2cc51d1d39270a8145757debb5578057ef87ff71/src/mongo/db/service_entry_point_common.cpp#L1663
JIRAUSER1259052 commented on Wed, 6 Oct 2021 19:07:24 +0000: Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you! xgen-internal-githook commented on Tue, 25 May 2021 16:59:31 +0000: Author: {'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'} Message: SERVER-57051 Shard may fail to notify that router was stale for command in multi-statement transaction (cherry picked from commit 4493d9309d2622844c41195baa6aadde2005362c) Branch: v5.0 https://github.com/mongodb/mongo/commit/1769c4bb6b2ccb382aa4c95b35c0e3afe3d18cef xgen-internal-githook commented on Tue, 25 May 2021 12:24:42 +0000: Author: {'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'} Message: SERVER-57051 Shard may fail to notify that router was stale for command in multi-statement transaction Branch: master https://github.com/mongodb/mongo/commit/4493d9309d2622844c41195baa6aadde2005362c
Click on a version to see all relevant bugs
MongoDB Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.