Skip to content

Commit 8b5c099

Browse files
committed
[BugFix] Fix streaming aggregate always force streaming in when query memory limit is 0
in PR StarRocks#34120 we change default query_memory_limit to -1, which will make streaming aggregate change to limited memory mode. Signed-off-by: stdpain <[email protected]>
1 parent 85026f4 commit 8b5c099

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

be/src/exec/pipeline/pipeline_driver.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,8 +615,9 @@ void PipelineDriver::_try_to_release_buffer(RuntimeState* state, OperatorPtr& op
615615
return;
616616
}
617617
auto query_mem_tracker = _query_ctx->mem_tracker();
618-
auto query_mem_limit = query_mem_tracker->limit();
619618
auto query_consumption = query_mem_tracker->consumption();
619+
auto query_mem_limit = query_mem_tracker->lowest_limit();
620+
DCHECK_GT(query_mem_limit, 0);
620621
auto spill_mem_threshold = query_mem_limit * state->spill_mem_limit_threshold();
621622
if (query_consumption >= spill_mem_threshold * release_buffer_mem_ratio) {
622623
// if the currently used memory is very close to the threshold that triggers spill,

0 commit comments

Comments
 (0)