summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCheahuychou Mao <cheahuychou.mao@mongodb.com>2020-05-19 10:26:33 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-05-19 15:55:48 +0000
commitfa03802cb9b42818dd2180f966dd8da64203186a (patch)
tree3afcf43efb79f7e924bfc38cb9e94814f41b7d73
parenta8cacc79c8294e62002a4ba474649e8cfcd92197 (diff)
downloadmongo-fa03802cb9b42818dd2180f966dd8da64203186a.tar.gz
SERVER-26755 Increase the timeout for find operations against config.chunks
-rw-r--r--src/mongo/s/client/shard_remote.cpp4
-rw-r--r--src/mongo/s/client/shard_remote.idl8
2 files changed, 11 insertions, 1 deletions
diff --git a/src/mongo/s/client/shard_remote.cpp b/src/mongo/s/client/shard_remote.cpp
index a68b8806c05..46536654b67 100644
--- a/src/mongo/s/client/shard_remote.cpp
+++ b/src/mongo/s/client/shard_remote.cpp
@@ -368,7 +368,9 @@ StatusWith<Shard::QueryResponse> ShardRemote::_exhaustiveFindOnConfig(
}
const Milliseconds maxTimeMS =
- std::min(opCtx->getRemainingMaxTimeMillis(), kDefaultConfigCommandTimeout);
+ std::min(opCtx->getRemainingMaxTimeMillis(),
+ nss == ChunkType::ConfigNS ? Milliseconds(gFindChunksOnConfigTimeoutMS.load())
+ : kDefaultConfigCommandTimeout);
BSONObjBuilder findCmdBuilder;
diff --git a/src/mongo/s/client/shard_remote.idl b/src/mongo/s/client/shard_remote.idl
index aa01146727d..46d99daf968 100644
--- a/src/mongo/s/client/shard_remote.idl
+++ b/src/mongo/s/client/shard_remote.idl
@@ -36,3 +36,11 @@ server_parameters:
default: false
cpp_vartype: AtomicWord<bool>
cpp_varname: gInternalProhibitShardOperationRetry
+
+ findChunksOnConfigTimeoutMS:
+ description: >-
+ The timeout for find operations against config.chunks.
+ set_at: [startup, runtime]
+ cpp_vartype: AtomicWord<int32_t>
+ cpp_varname: gFindChunksOnConfigTimeoutMS
+ default: 900000