yiguolei commented on code in PR #20771: URL: https://github.com/apache/doris/pull/20771#discussion_r1250414418
########## be/src/vec/sink/vtablet_sink.cpp: ########## @@ -887,6 +909,17 @@ void VNodeChannel::cancel(const std::string& cancel_msg) { request.release_id(); } +bool VNodeChannel::is_pending_rpc_done() const { + return (_add_batches_finished || _cancelled) && open_partition_finished(); +} + +void VNodeChannel::try_pending_rpc_done() { + if (is_pending_rpc_done() && _pending_rpc) { + _parent->_running_channels_num--; + _pending_rpc = false; Review Comment: rename to _has_pending_rpc and change to (_has_pending_rpc && is_pending_rpc_done()) so that the performance will be better. -- 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