github-actions[bot] commented on code in PR #62273:
URL: https://github.com/apache/doris/pull/62273#discussion_r3083731166
##########
be/src/exec/common/memory.cpp:
##########
@@ -60,8 +89,8 @@ int MemLimiter::available_scanner_count(int ins_idx) const {
per_count += 1;
Review Comment:
`expected` should not be computed with `std::max(max_tasks, min_tasks)`. In
the memory-pressure case `max_tasks` is the cap returned by
`MemLimiter::empty_task_slots()`, but this expression forces the result back up
to at least `min_tasks`, so adaptive scheduling can never shrink below the
configured minimum even when the memory-derived limit is lower.
Concrete failure path: if a scan/local-exchange instance has
`min_concurrency = 4` and memory pressure reduces `empty_task_slots()` to `1`,
this code still returns `4`, and `ScannerContext::_get_margin()` /
`LocalExchangeSharedState::adjust_parallelism()` will continue scheduling four
tasks. That defeats the new memory-control goal of the PR.
##########
be/src/exec/pipeline/dependency.cpp:
##########
@@ -54,6 +54,15 @@ Dependency* BasicSharedState::create_sink_dependency(int
dest_id, int node_id,
return sink_deps.back().get();
}
+void BasicSharedState::create_sink_dependencies(int num_sink, int dest_id, int
node_id,
Review Comment:
The adaptive branch no longer updates `mem_usage` or checks
`buffer_mem_limit`, so enabling `enable_adaptive_execution` silently removes
the existing hard byte cap for local-exchange buffering.
Before this change, every enqueue/dequeue updated `mem_usage` and
blocked/unblocked the sink dependency once buffered bytes crossed
`local_exchange_buffer_mem_limit`. After this change, the adaptive path only
calls `adjust_parallelism()` based on task slots and ignores the actual
buffered-byte total. A query can therefore keep buffering very large exchange
blocks far past `buffer_mem_limit` as long as the task-count heuristic does not
block it. That is a behavioral regression in the local-exchange backpressure
path, not just a refactor.
--
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]