Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-74095

Support multiple namespaces in bulkWrite sub-batching logic

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Fully Compatible
    • Repl 2023-02-20, Repl 2023-03-06

      SERVER-72787 added sub-batching logic for bulkWrite and reused most of the targeting logic from BatchWriteOp. But one thing we missed was that the target function group targeted batches based on ShardEndpoint (which is a struct with shardId and shard/db version). But since bulkWrite support batched writes against multiple namespaces, targeted writes for different namespaces could have different ShardEndpoints (based on EndpointComp) even if they target the same shard. Therefore, we would end up mistakenly batching writes against different namespaces into separate batches if even they target the same shard.

      This ticket is to fix that and allow sub-batching writes of multiple namespaces as long as they target the same shard (regardless of the endpoint comparisons).

            Assignee:
            lingzhi.deng@mongodb.com Lingzhi Deng
            Reporter:
            lingzhi.deng@mongodb.com Lingzhi Deng
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: