Details
-
Task
-
Resolution: Fixed
-
Major - P3
-
None
-
Fully Compatible
-
Sharding 2020-08-24, Sharding 2020-09-21
-
0
Description
The goal of this ticket is to create a function which allows the aggregation pipeline to easily be sent to a remote (donor) shard and for the aggregation pipeline to be unit-testable with DocumentSourceMock. It is preferable to use DocumentSourceXX::create() functions (or DocumentSourceXX::parseFromBSON() when the former isn't available or is too tedious) rather than building it up with string concatenation. DocumentSources can be conditionally added to the Pipeline::SourceContainer, for example, to reflect a stage being added only when resuming on a new cursor.
std::unique_ptr<Pipeline, PipelineDeleter> createCloningPipelineForResharding(
|
ShardKeyPattern newShardKeyPattern,
|
NamespaceString sourceNss, /* nss of the collection being resharded */ |
BSONObj startAfter, /* expected to be an object of the form {_id: <any>} or isEmpty() */ |
ShardId recipientShard
|
);
|
Some of these parameters are probably more appropriate to take by const-ref because their contents can only be copied into the Pipeline anyway.
Attachments
Issue Links
- has to be done after
-
SERVER-49289 Support specifying a collection by its UUID to the aggregate command
-
- Closed
-
-
SERVER-49290 Support running $lookup locally on shard for config.cache.chunks.* namespaces
-
- Closed
-
-
SERVER-49214 Add $toHashedIndexKey expression
-
- Closed
-
- has to be done before
-
SERVER-49787 Create collection bulk loader for resharding
-
- Closed
-
-
SERVER-51005 Add support for hashed shard keys to aggregation pipeline for collection bulk loader for resharding
-
- Closed
-