summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/abstract_oplog_fetcher.h
diff options
context:
space:
mode:
authorJudah Schvimer <judah@mongodb.com>2017-09-13 11:58:43 -0400
committerJudah Schvimer <judah@mongodb.com>2017-09-13 11:58:43 -0400
commit5dbccb4a861aa2db993dd673097a1300bcdc9cca (patch)
treee13077ba423a9f5043c6e033a90de731b891e705 /src/mongo/db/repl/abstract_oplog_fetcher.h
parent76da39708f4d07ed0cf56d986d1c6f3d4353e670 (diff)
downloadmongo-5dbccb4a861aa2db993dd673097a1300bcdc9cca.tar.gz
SERVER-19605 make oplog timeout configurable
Diffstat (limited to 'src/mongo/db/repl/abstract_oplog_fetcher.h')
-rw-r--r--src/mongo/db/repl/abstract_oplog_fetcher.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/mongo/db/repl/abstract_oplog_fetcher.h b/src/mongo/db/repl/abstract_oplog_fetcher.h
index 97511aa272c..087e1c4ac42 100644
--- a/src/mongo/db/repl/abstract_oplog_fetcher.h
+++ b/src/mongo/db/repl/abstract_oplog_fetcher.h
@@ -71,14 +71,6 @@ public:
using OnShutdownCallbackFn = stdx::function<void(const Status& shutdownStatus)>;
/**
- * Constants used to specify how long the `find` command, `getMore` commands, and network
- * operations should wait before timing out.
- */
- static const Seconds kOplogInitialFindMaxTime;
- static const Seconds kOplogGetMoreMaxTime;
- static const Seconds kOplogQueryNetworkTimeout;
-
- /**
* This function takes a BSONObj oplog entry and parses out the OpTime and hash.
*/
static StatusWith<OpTimeWithHash> parseOpTimeWithHash(const BSONObj& oplogEntryObj);
@@ -119,6 +111,16 @@ public:
protected:
/**
+ * Returns how long the `find` command should wait before timing out.
+ */
+ virtual Milliseconds _getFindMaxTime() const;
+
+ /**
+ * Returns how long the `getMore` command should wait before timing out.
+ */
+ virtual Milliseconds _getGetMoreMaxTime() const;
+
+ /**
* Returns the sync source from which this oplog fetcher is fetching.
*/
HostAndPort _getSource() const;