-
Type: Task
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Sharding
Currently ShardingTaskExecutor::scheduleRemoteCommand adds sessionId to the command before its passed to shards. https://github.com/mongodb/mongo/blob/r3.7.2/src/mongo/s/sharding_task_executor.cpp#L122-L131
This is wrong place for command mutating operations. There are other better places such as
build(Un)VersionedRequestsForTargetedShards
another related issue with this code is that it does not pass the txnNumber: adding this code to sharding_task_executor
if (request.opCtx->getTxnNumber() && !request.cmdObj.hasField("txnNumber")) { bob.append("txnNumber", *(request.opCtx->getTxnNumber())); }
breaks retryable_writes.js test https://logkeeper.mongodb.org/lobster/build/3fd956889add4ebb942a9029d1966e5c/test/5aa07efebe07c43cdf26e014?bookmarks=0%2C2203
- duplicates
-
SERVER-33991 Pass txnNumber all the getMore command on mongos
- Closed
- is depended on by
-
SERVER-33029 Support snapshot in cluster aggregate command
- Closed