- Implement distributedPlanLogic() to select the shard on which we are writing the data indicate that the merging pipeline (or full pipeline if unsplit) should be executed on that shard.
- That ShardId should be stored as a data member and passed to MongoProcessInterface::createCollection() when creating the temp collection.
Test cases:
- Input and output collection both exist, are both unsharded and both reside on the same non-primary shard
- Input and output collection both exist and are unsharded but reside on different non-primary shards
- Input collection is sharded. Output collection exists and resides on a non-primary shard.
- Output collection does not exist. Input collection is unsharded and resides on a non-primary shard.
- Output collection exist and resides on a non-primary shard and moved during execution to another shard.
- depends on
-
SERVER-81844 Make ShardServerProcessInterface::createCollection use shardsvrCreateCollection
- Closed
- related to
-
SERVER-83614 $queue/$lookup pipeline can throw if database dropped at wrong time
- Closed