summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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