diff options
author | Cheahuychou Mao <mao.cheahuychou@gmail.com> | 2021-03-14 20:43:05 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-04-07 14:42:24 +0000 |
commit | c2566e29b96559ac5ba4c8616a357c4025a0f843 (patch) | |
tree | 7cc1e98542e7d9df49c8e715b02e82c61c5bd7ec /src/mongo/client/remote_command_targeter_rs.cpp | |
parent | e59d95b4dc565bade90426730a9415bc9be50e07 (diff) | |
download | mongo-c2566e29b96559ac5ba4c8616a357c4025a0f843.tar.gz |
SERVER-54157 Remove maxWait from comments for findHost and getHostOrRefreshr5.0.0-alpha
Diffstat (limited to 'src/mongo/client/remote_command_targeter_rs.cpp')
-rw-r--r-- | src/mongo/client/remote_command_targeter_rs.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mongo/client/remote_command_targeter_rs.cpp b/src/mongo/client/remote_command_targeter_rs.cpp index f1b99732569..2c0f64e3c4a 100644 --- a/src/mongo/client/remote_command_targeter_rs.cpp +++ b/src/mongo/client/remote_command_targeter_rs.cpp @@ -81,10 +81,8 @@ StatusWith<HostAndPort> RemoteCommandTargeterRS::findHost(OperationContext* opCt return interruptStatus; } - // Enforce a 20-second ceiling on the time spent looking for a host. This conforms with the - // behavior used throughout mongos prior to version 3.4, but is not fundamentally desirable. - // See comment in remote_command_targeter.h for details. - bool maxTimeMsLesser = (opCtx->getRemainingMaxTimeMillis() < Milliseconds(Seconds(20))); + bool maxTimeMsLesser = + (opCtx->getRemainingMaxTimeMillis() < ReplicaSetMonitorInterface::kDefaultFindHostTimeout); auto swHostAndPort = _rsMonitor->getHostOrRefresh(readPref, opCtx->getCancellationToken()).getNoThrow(opCtx); |