summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Tarzia <steve.tarzia@mongodb.com>2023-03-15 14:24:14 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-03-15 18:00:29 +0000
commitca939e3cc87615cc33211efbc097283c5f53b68b (patch)
tree24a805d50265b3dae6417b029c846827ea1eb6ba
parentfb56c5b9a1d93ce4fe66238f723b554f1a13e1c3 (diff)
downloadmongo-ca939e3cc87615cc33211efbc097283c5f53b68b.tar.gz
SERVER-74550 Reserve 25% of time budget for processing buffered partial results
-rw-r--r--src/mongo/s/query/cluster_find.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/s/query/cluster_find.cpp b/src/mongo/s/query/cluster_find.cpp
index ffb745e8b4a..c9f22408463 100644
--- a/src/mongo/s/query/cluster_find.cpp
+++ b/src/mongo/s/query/cluster_find.cpp
@@ -308,10 +308,10 @@ CursorId runQueryWithoutRetrying(OperationContext* opCtx,
// deadline so that we have time to return partial results before the opCtx is killed.
auto deadline = opCtx->getDeadline();
if (findCommand.getAllowPartialResults() && findCommand.getMaxTimeMS()) {
- // Reserve 10% of the time budget (up to 100,000 microseconds max) for processing
+ // Reserve 25% of the time budget (up to 100,000 microseconds max) for processing
// buffered partial results.
deadline -=
- Microseconds{std::min(1000LL * (*findCommand.getMaxTimeMS()) / 10, 100'000LL)};
+ Microseconds{std::min(1000LL * findCommand.getMaxTimeMS().get() / 4, 100'000LL)};
LOGV2_DEBUG(
5746901,
0,