summaryrefslogtreecommitdiff
path: root/src/mongo/client/fetcher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/client/fetcher.cpp')
-rw-r--r--src/mongo/client/fetcher.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mongo/client/fetcher.cpp b/src/mongo/client/fetcher.cpp
index 741efe9afab..4918bbf76c2 100644
--- a/src/mongo/client/fetcher.cpp
+++ b/src/mongo/client/fetcher.cpp
@@ -171,7 +171,8 @@ Fetcher::Fetcher(executor::TaskExecutor* executor,
const BSONObj& findCmdObj,
const CallbackFn& work,
const BSONObj& metadata,
- Milliseconds timeout,
+ Milliseconds findNetworkTimeout,
+ Milliseconds getMoreNetworkTimeout,
std::unique_ptr<RemoteCommandRetryScheduler::RetryPolicy> firstCommandRetryPolicy)
: _executor(executor),
_source(source),
@@ -179,10 +180,11 @@ Fetcher::Fetcher(executor::TaskExecutor* executor,
_cmdObj(findCmdObj.getOwned()),
_metadata(metadata.getOwned()),
_work(work),
- _timeout(timeout),
+ _findNetworkTimeout(findNetworkTimeout),
+ _getMoreNetworkTimeout(getMoreNetworkTimeout),
_firstRemoteCommandScheduler(
_executor,
- RemoteCommandRequest(_source, _dbname, _cmdObj, _metadata, nullptr, _timeout),
+ RemoteCommandRequest(_source, _dbname, _cmdObj, _metadata, nullptr, _findNetworkTimeout),
stdx::bind(&Fetcher::_callback, this, stdx::placeholders::_1, kFirstBatchFieldName),
std::move(firstCommandRetryPolicy)) {
uassert(ErrorCodes::BadValue, "callback function cannot be null", work);
@@ -204,10 +206,6 @@ BSONObj Fetcher::getMetadataObject() const {
return _metadata;
}
-Milliseconds Fetcher::getTimeout() const {
- return _timeout;
-}
-
std::string Fetcher::toString() const {
return getDiagnosticString();
}
@@ -221,7 +219,8 @@ std::string Fetcher::getDiagnosticString() const {
output << " query: " << _cmdObj;
output << " query metadata: " << _metadata;
output << " active: " << _isActive_inlock();
- output << " timeout: " << _timeout;
+ output << " findNetworkTimeout: " << _findNetworkTimeout;
+ output << " getMoreNetworkTimeout: " << _getMoreNetworkTimeout;
output << " shutting down?: " << _isShuttingDown_inlock();
output << " first: " << _first;
output << " firstCommandScheduler: " << _firstRemoteCommandScheduler.toString();
@@ -316,7 +315,8 @@ Status Fetcher::_scheduleGetMore(const BSONObj& cmdObj) {
}
StatusWith<executor::TaskExecutor::CallbackHandle> scheduleResult =
_executor->scheduleRemoteCommand(
- RemoteCommandRequest(_source, _dbname, cmdObj, _metadata, nullptr, _timeout),
+ RemoteCommandRequest(
+ _source, _dbname, cmdObj, _metadata, nullptr, _getMoreNetworkTimeout),
stdx::bind(&Fetcher::_callback, this, stdx::placeholders::_1, kNextBatchFieldName));
if (!scheduleResult.isOK()) {