Mongos executes the write commands targeting logic twice per request

XMLWordPrintableJSON

    • Sharding
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            [DO NOT USE] Backlog - Sharding Team
            Reporter:
            Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: