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>2022-02-03 19:15:28 +0000
commitd7ecec38af5b1b63603519cc4d36fc0532d192e1 (patch)
tree8cd7078b6311177dfc080ccc23978716c359e7f1
parent7fdc540775385121f4da78fcd123dd366a9d303b (diff)
downloadmongo-d7ecec38af5b1b63603519cc4d36fc0532d192e1.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.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 e9d73d4e319..8db799fc4e6 100644
--- a/src/mongo/s/client/shard_remote.cpp
+++ b/src/mongo/s/client/shard_remote.cpp
@@ -364,7 +364,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