[SERVER-32510] Mongos executes the write commands targeting logic twice per request Created: 02/Jan/18 Updated: 06/Dec/22 Resolved: 23/Jan/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.6.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kaloian Manassiev | Assignee: | [DO NOT USE] Backlog - Sharding Team |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | former-quick-wins, gm-ack | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Sharding
|
| Operating System: | ALL |
| Participants: |
| Description |
|
For every batch write request executed, mongos once targets the entire collection and then performs the regular shard key based logic. Note that this is just the targeting logic, it's not executing the actual request. This seems to only be done in order to find out if any of the writes are going against the config server. Since executing the targeting logic is somewhat expensive, this can be avoided by setting the shard version to IGNORED in WriteOp::targetWrites instead. |