Gabriel39 commented on code in PR #70654:
URL: https://github.com/apache/doris/pull/70654#discussion_r4609255437
##########
be/src/format_v2/table/mongodb_reader.cpp:
##########
@@ -72,8 +80,11 @@ Status acquire_pool(const TMongoScanDesc& d,
std::shared_ptr<ClientPool>* result
for (const auto* value : {&d.uri, &d.username, &d.password,
&d.auth_database}) {
key += ":" + std::to_string(value->size()) + ":" + *value;
}
- key += ":" + std::to_string(d.timeout_ms) + ":" +
std::to_string(d.connect_timeout_ms) + ":" +
- std::to_string(d.server_selection_timeout_ms) + ":" +
+ const auto connect_timeout = std::min<int64_t>(d.connect_timeout_ms,
d.timeout_ms);
+ const auto selection_timeout =
std::min<int64_t>(d.server_selection_timeout_ms, d.timeout_ms);
+ // Snapshot planning consumes different amounts of each scan's deadline.
Key the effective
+ // transport caps, not the remaining lifetime, or every scan could bypass
the shared pool bound.
+ key += ":" + std::to_string(connect_timeout) + ":" +
std::to_string(selection_timeout) + ":" +
Review Comment:
Addressed in #70708 (pending merge). Both pool identity and pool
construction now use the configured connection/selection caps, so remaining
budgets below those caps still contend for the same client limit. Per-stream
socket/server/local deadlines stay separate.
The below-cap native regression fails before the fix and passes afterward.
Authenticated MongoDB 7/8 contention tests also cover a one-client pool with
the default 10000 ms transport caps and a competing 2-second query. Synchronous
connection/selection can still consume their configured cap; that limitation is
documented explicitly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]