-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
Fully Compatible
-
Sharding 2020-09-21, Sharding 2020-10-05
-
48
The oplog fetcher for resharding should take the aggregation pipeline from SERVER-49891, run it against a particular donor, and insert the returned documents into the oplog buffer collection on itself (a recipient).
- Serialize the aggregation pipeline from createOplogFetchingPipelineForResharding() using Pipeline::serializeToBson() and use the serialized form to create an AggregationRequest.
- Add the necessary read concern and hint to the AggregationRequest.
- Run the aggregate command on the remote donor. We likely don't want to use ClusterAggregate::runAggregate() because we want a recipient to target each donor with a unique aggregation pipeline (unique due to different resume points).
- One option may be to use ShardRemote::runCommand() and Fetcher like ShardRemote::_runExhaustiveCursorCommand does.
- Another option may be to use DBClientCursor like OplogFetcher does. This is perhaps the only way to take advantage of the QueryOption_Exhaust option.
- Use Collection::insertDocuments() to insert the documents into the new sharded collection.
- has to be done after
-
SERVER-49891 Write and test aggregation pipeline for oplog fetcher for resharding
- Closed
- is depended on by
-
SERVER-49894 Have resharding oplog fetcher resume from 'ts' component of largest _id inserted
- Closed
-
SERVER-49897 Insert no-op entries into oplog buffer collections for resharding so resuming is less wasteful
- Closed