[SERVER-33702] Move sessionId and txnNumber addition from ShardingTaskExecutor::scheduleRemoteCommand Created: 06/Mar/18 Updated: 05/Jun/18 Resolved: 17/Apr/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Misha Tyulenev | Assignee: | Misha Tyulenev |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | PM-834, todo_in_code | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
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 another related issue with this code is that it does not pass the txnNumber: adding this code to sharding_task_executor
breaks retryable_writes.js test https://logkeeper.mongodb.org/lobster/build/3fd956889add4ebb942a9029d1966e5c/test/5aa07efebe07c43cdf26e014?bookmarks=0%2C2203 |
| Comments |
| Comment by Misha Tyulenev [ 10/Apr/18 ] |
|
This should be reviewed later when commands data handling is simplified. |
| Comment by Randolph Tan [ 09/Mar/18 ] |
|
Mongos shouldn't need to attach txnNumber since it is already included in the user request. The only exception for this is when mongos had to construct new request (ex. write commands has to split the request to multiple small batches to be sent to multiple shards) where it has to make sure that it includes the txnNumber. |