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

Remove HostTypeRequirement::kPrimaryShard from $merge

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Query Execution
    • Fully Compatible
    • QE 2023-10-16, QE 2023-10-30

      Use kNone instead of kPrimaryShard. Change distributedPlanLogic() such that we indicate which shard the $merge should execute on in the case that a single shard owns all the data.

      Test cases:

      • Input and output collections unsharded but reside on two different non-primary shards
      • Input collection sharded, output collection unsharded but not on primary shard
      • Input collection unsharded but not on primary shard, output collection sharded
      • Input and output collections unsharded and input collection is moved during execution. The query should fail with QueryPlanKilled.
      • Input and output collections unsharded and output collection is moved during execution. During execution, update commands should switch over to targeting the inner collection’s new owner or the query should fail with QueryPlanKilled.
      • Input is not a collection, but $documents, so we should run on the shard that owns output collection (if present)

            Assignee:
            ivan.fefer@mongodb.com Ivan Fefer
            Reporter:
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: