diff options
author | Benety Goh <benety@mongodb.com> | 2016-07-21 14:56:34 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2016-07-22 14:39:49 -0400 |
commit | dfe5d4b0b4986c18e8eff3634a3f44b28d4a2197 (patch) | |
tree | 11c7b3b8299c9b218929adf2529c7be94bc42d85 /src/mongo/db/repl/databases_cloner.h | |
parent | 9a8cc7728527c33bb6d0ecdddd0952ce22b61d2a (diff) | |
download | mongo-dfe5d4b0b4986c18e8eff3634a3f44b28d4a2197.tar.gz |
SERVER-25197 DataReplicator tests should explicitly override CollectionCloner db work scheduler for deterministic behavior.
Diffstat (limited to 'src/mongo/db/repl/databases_cloner.h')
-rw-r--r-- | src/mongo/db/repl/databases_cloner.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/repl/databases_cloner.h b/src/mongo/db/repl/databases_cloner.h index 27b9bddc5ce..c238a01e8f9 100644 --- a/src/mongo/db/repl/databases_cloner.h +++ b/src/mongo/db/repl/databases_cloner.h @@ -85,6 +85,13 @@ public: Status getStatus(); std::string toString() const; + /** + * Overrides how executor schedules database work. + * + * For testing only. + */ + void setScheduleDbWorkFn_forTest(const CollectionCloner::ScheduleDbWorkFn& scheduleDbWorkFn); + private: /** * Setting the status to not-OK will stop the process @@ -122,6 +129,7 @@ private: std::vector<std::shared_ptr<DatabaseCloner>> _databaseCloners; // (M) database cloners by name int _clonersActive = 0; // (M) Number of active cloners left. std::unique_ptr<RemoteCommandRetryScheduler> _listDBsScheduler; // (M) scheduler for listDBs. + CollectionCloner::ScheduleDbWorkFn _scheduleDbWorkFn; // (M) const IncludeDbFilterFn _includeDbFn; // (R) function which decides which dbs are cloned. const OnFinishFn _finishFn; // (R) function called when finished. |