github-actions[bot] commented on code in PR #28224: URL: https://github.com/apache/doris/pull/28224#discussion_r1421894267
########## be/src/pipeline/pipeline_x/dependency.h: ########## @@ -611,14 +614,30 @@ dep->set_ready(); } } + void set_dep_by_channel_id(Dependency* dep, int channel_id) { source_dependencies[channel_id] = dep; } - void set_ready_for_read(int channel_id) { + + void set_ready_to_read(int channel_id) { auto* dep = source_dependencies[channel_id]; - DCHECK(dep) << channel_id << " " << (int64_t)this; + DCHECK(dep) << channel_id; dep->set_ready(); } + + void add_mem_usage(int channel_id, size_t delta) { + mem_trackers[channel_id]->consume(delta); + if (mem_usage.fetch_add(delta) > config::local_exchange_buffer_mem_limit) { + sink_dependency->block(); + } + } + + void sub_mem_usage(int channel_id, size_t delta) { Review Comment: warning: method 'sub_mem_usage' can be made const [readability-make-member-function-const] ```suggestion void sub_mem_usage(int channel_id, size_t delta) const { ``` ########## be/src/pipeline/pipeline_x/dependency.h: ########## @@ -611,14 +614,30 @@ struct LocalExchangeSharedState : public BasicSharedState { dep->set_ready(); } } + void set_dep_by_channel_id(Dependency* dep, int channel_id) { source_dependencies[channel_id] = dep; } - void set_ready_for_read(int channel_id) { + + void set_ready_to_read(int channel_id) { Review Comment: warning: method 'set_ready_to_read' can be made static [readability-convert-member-functions-to-static] ```suggestion static void set_ready_to_read(int channel_id) { ``` ########## be/src/pipeline/pipeline_x/dependency.h: ########## @@ -611,14 +614,30 @@ dep->set_ready(); } } + void set_dep_by_channel_id(Dependency* dep, int channel_id) { source_dependencies[channel_id] = dep; } - void set_ready_for_read(int channel_id) { + + void set_ready_to_read(int channel_id) { auto* dep = source_dependencies[channel_id]; - DCHECK(dep) << channel_id << " " << (int64_t)this; + DCHECK(dep) << channel_id; dep->set_ready(); } + + void add_mem_usage(int channel_id, size_t delta) { Review Comment: warning: method 'add_mem_usage' can be made const [readability-make-member-function-const] ```suggestion void add_mem_usage(int channel_id, size_t delta) const { ``` -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org