summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/tenant_collection_cloner.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/tenant_collection_cloner.h')
-rw-r--r--src/mongo/db/repl/tenant_collection_cloner.h29
1 files changed, 1 insertions, 28 deletions
diff --git a/src/mongo/db/repl/tenant_collection_cloner.h b/src/mongo/db/repl/tenant_collection_cloner.h
index 12bd9bbb832..081ca271fc5 100644
--- a/src/mongo/db/repl/tenant_collection_cloner.h
+++ b/src/mongo/db/repl/tenant_collection_cloner.h
@@ -65,14 +65,6 @@ public:
void append(BSONObjBuilder* builder) const;
};
- /**
- * Type of function to schedule storage interface tasks with the executor.
- *
- * Used for testing only.
- */
- using ScheduleDbWorkFn = unique_function<StatusWith<executor::TaskExecutor::CallbackHandle>(
- executor::TaskExecutor::CallbackFn)>;
-
TenantCollectionCloner(const NamespaceString& ns,
const CollectionOptions& collectionOptions,
TenantMigrationSharedData* sharedData,
@@ -108,15 +100,6 @@ public:
_collectionClonerBatchSize = batchSize;
}
- /**
- * Overrides how executor schedules database work.
- *
- * For testing only.
- */
- void setScheduleDbWorkFn_forTest(ScheduleDbWorkFn scheduleDbWorkFn) {
- _scheduleDbWorkFn = std::move(scheduleDbWorkFn);
- }
-
Timestamp getOperationTime_forTest();
protected:
@@ -217,18 +200,13 @@ private:
/**
* Called whenever there is a new batch of documents ready from the DBClientConnection.
*/
- void insertDocumentsCallback(const executor::TaskExecutor::CallbackArgs& cbd);
+ void insertDocuments(std::vector<BSONObj> docsToInsert);
/**
* Sends a query command to the source.
*/
void runQuery();
- /**
- * Waits for any database work to finish or fail.
- */
- void waitForDatabaseWorkToComplete();
-
// All member variables are labeled with one of the following codes indicating the
// synchronization rules for accessing them.
//
@@ -258,14 +236,9 @@ private:
BSONObj _idIndexSpec; // (X)
BSONObj _lastDocId; // (X)
- // Function for scheduling database work using the executor.
- ScheduleDbWorkFn _scheduleDbWorkFn; // (R)
// Documents read from source to insert.
std::vector<BSONObj> _documentsToInsert; // (M)
Stats _stats; // (M)
- // We put _dbWorkTaskRunner after anything the database threads depend on to ensure it is
- // only destroyed after those threads exit.
- TaskRunner _dbWorkTaskRunner; // (R)
// The database name prefix of the tenant associated with this migration.
std::string _tenantId; // (R)