Batch/BulkWriteExec's batching is suboptimal when an update's filter doesn't include shard key or _id

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      This ticket is in reference to how at present BatchWriteExec and BulkWriteExec will always process an update/upsert op in a batch by itself when the op’s filter doesn’t include the shard key or _id, which is likely suboptimal. Here is a link to the relevant code.

      The goal of this ticket is to investigate if we can do better than this without incurring unacceptable downsides. (Batching in this scenario could maybe potentially increase the rate of write conflicts for some workloads, so we need to understand any such tradeoffs in order to decide how to best proceed.)

      This ticket also applies to upsert ops by _id without shard key, which are also run in single-op batches (similar to update/upsert ops that don't include shard key or _id).

            Assignee:
            Unassigned
            Reporter:
            Drew Paroski
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: