-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.6.1
-
Component/s: Sharding
-
Sharding
-
ALL
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.