|
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).
- Use Collection::insertDocuments() to insert the documents into the new sharded collection.
|