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:08:52 +0000 |
commit | 32d791e2c466ad480b47b050dc0016018775473b (patch) | |
tree | 7e9f85d4d1f58684fa9d50c0bd75e28fec7bea6d | |
parent | 4eb86bdf03bf18c269c1d03211a5382d272ab7ac (diff) | |
download | mongo-32d791e2c466ad480b47b050dc0016018775473b.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 | 4 | ||||
-rw-r--r-- | src/mongo/s/client/shard_remote.idl | 8 |
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 39f9d32125e..090b03d532d 100644 --- a/src/mongo/s/client/shard_remote.cpp +++ b/src/mongo/s/client/shard_remote.cpp @@ -370,7 +370,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 |