Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-7355

Investigate changes in SERVER-79582: Remove HostTypeRequirement::kPrimaryShard from $merge

    • Type: Icon: Investigation Investigation
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • No version
    • Affects Version/s: None
    • Component/s: None
    • None
    • Not Needed
    • Hide

      No action required in DevTools products

      Show
      No action required in DevTools products

      Original Downstream Change Summary

      When aggregation pipeline is split, there is a new value possible in explain field "mergeType" - "specificShard".

      When "mergeType" == "specificShard", a field "mergeShard" is added, containing the shard id of the merging shard.

      Description of Linked Ticket

      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:
            Unassigned Unassigned
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: