diff options
author | Cheahuychou Mao <cheahuychou.mao@mongodb.com> | 2020-05-19 10:26:33 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-02-03 19:20:45 +0000 |
commit | 3f62170f634d76afd82597b512f0e1ac1656d3ae (patch) | |
tree | 076db40a96cf798f1b63f6aa9df5a8088c29a722 | |
parent | d7e901bdac42cfcc735f3d2f17335cba6cbf018c (diff) | |
download | mongo-3f62170f634d76afd82597b512f0e1ac1656d3ae.tar.gz |
SERVER-26755 Increase the timeout for find operations against config.chunks
(cherry picked from commit fa03802cb9b42818dd2180f966dd8da64203186a)
-rw-r--r-- | src/mongo/s/client/shard_remote.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/s/client/shard_remote.cpp b/src/mongo/s/client/shard_remote.cpp index e272353c854..df184618bf8 100644 --- a/src/mongo/s/client/shard_remote.cpp +++ b/src/mongo/s/client/shard_remote.cpp @@ -77,6 +77,9 @@ MONGO_EXPORT_SERVER_PARAMETER(internalProhibitShardOperationRetry, bool, internalProhibitShardOperationRetryByDefault); +constexpr int findChunksOnConfigTimeoutMSDefault = 900000; +MONGO_EXPORT_SERVER_PARAMETER(findChunksOnConfigTimeoutMS, int, findChunksOnConfigTimeoutMSDefault); + /** * Returns a new BSONObj describing the same command and arguments as 'cmdObj', but with maxTimeMS * replaced by maxTimeMSOverride (or removed if maxTimeMSOverride is Milliseconds::max()). @@ -280,7 +283,6 @@ StatusWith<Shard::QueryResponse> ShardRemote::_runExhaustiveCursorCommand( auto fetcherCallback = [&status, &response](const Fetcher::QueryResponseStatus& dataStatus, Fetcher::NextAction* nextAction, BSONObjBuilder* getMoreBob) { - // Throw out any accumulated results on error if (!dataStatus.isOK()) { status = dataStatus.getStatus(); @@ -373,7 +375,9 @@ StatusWith<Shard::QueryResponse> ShardRemote::_exhaustiveFindOnConfig( } const Milliseconds maxTimeMS = - std::min(opCtx->getRemainingMaxTimeMillis(), kDefaultConfigCommandTimeout); + std::min(opCtx->getRemainingMaxTimeMillis(), + nss == ChunkType::ConfigNS ? Milliseconds(findChunksOnConfigTimeoutMS.load()) + : kDefaultConfigCommandTimeout); BSONObjBuilder findCmdBuilder; |