class ReshardingCollectionCloner {
|
public:
|
...
|
|
/**
|
* Schedules work to repeatedly fetch and insert batches of documents.
|
*
|
* Returns a future that becomes ready when either:
|
* (a) all documents have been fetched and inserted, or
|
* (b) the cancellation token was canceled due to a stepdown or abort.
|
*/
|
SemiFuture<void> run(std::shared_ptr<executor::TaskExecutor> executor,
|
CancelationToken cancelToken);
|
|
/**
|
* Fetches and inserts a single batch of documents.
|
*
|
* Returns true if there are more documents to be fetched and inserted, and returns false
|
* otherwise.
|
*/
|
bool doOneBatch(OperationContext* opCtx, Pipeline& pipeline);
|
|
private:
|
std::unique_ptr<Pipeline, PipelineDeleter> _restartPipeline(OperationContext* opCtx);
|
|
...
|
};
|