[DOCS-16447] Investigate changes in SERVER-79582: Remove HostTypeRequirement::kPrimaryShard from $merge Created: 18/Oct/23  Updated: 13/Nov/23  Resolved: 10/Nov/23

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: 7.2.0-rc0, Server_Docs_20231113

Type: Task Priority: Minor - P4
Reporter: Backlog - Core Eng Program Management Team Assignee: Caleb Thompson
Resolution: Done Votes: 0
Labels: request
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-79582 Remove HostTypeRequirement::kPrimaryS... Closed
Participants:
Days since reply: 13 weeks ago

 Description   
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)


 Comments   
Comment by Caleb Thompson [ 08/Nov/23 ]

https://github.com/10gen/docs-mongodb-internal/pull/5251

Generated at Thu Feb 08 08:15:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.