yiguolei commented on code in PR #32641:
URL: https://github.com/apache/doris/pull/32641#discussion_r1542290653
##########
be/src/pipeline/pipeline_x/pipeline_x_task.cpp:
##########
@@ -326,6 +304,46 @@ Status PipelineXTask::execute(bool* eos) {
return status;
}
+bool PipelineXTask::should_revoke_memory(RuntimeState* state, int64_t
revocable_mem_bytes) {
+ auto* query_ctx = state->get_query_ctx();
+ bool need_revoke = query_ctx->query_mem_tracker->need_revoke();
+ if (!need_revoke) {
+ return false;
+ }
+
+ const auto min_revocable_mem_bytes = state->min_revocable_mem();
+
+ auto tg = query_ctx->workload_group();
+ bool is_tg_mem_low_water_mark = false;
+ bool is_tg_mem_high_water_mark = false;
+ if (tg) {
+ tg->check_mem_used(is_tg_mem_low_water_mark,
is_tg_mem_high_water_mark);
+ }
+ if (is_tg_mem_high_water_mark) {
+ if (revocable_mem_bytes > 1024 * 1024) {
Review Comment:
change this to an session variable.
not use magic numbers.
--
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]