liaoxin01 commented on code in PR #29957:
URL: https://github.com/apache/doris/pull/29957#discussion_r1453293240


##########
be/src/io/fs/multi_table_pipe.cpp:
##########
@@ -261,20 +261,9 @@ Status MultiTablePipe::exec_plans(ExecEnv* exec_env, 
std::vector<ExecParam> para
                         _status = *status;
                     }
 
-                    --_inflight_plan_cnt;
-                    if (_inflight_plan_cnt == 0 && is_consume_finished()) {
-                        _ctx->number_total_rows = _number_total_rows;
-                        _ctx->number_loaded_rows = _number_loaded_rows;
-                        _ctx->number_filtered_rows = _number_filtered_rows;
-                        _ctx->number_unselected_rows = _number_unselected_rows;
-                        _ctx->commit_infos = _tablet_commit_infos;
-                        LOG(INFO) << "all plan for multi-table load complete. 
number_total_rows="
-                                  << _ctx->number_total_rows
-                                  << " number_loaded_rows=" << 
_ctx->number_loaded_rows
-                                  << " number_filtered_rows=" << 
_ctx->number_filtered_rows
-                                  << " number_unselected_rows=" << 
_ctx->number_unselected_rows;
-                        _ctx->promise.set_value(
-                                _status); // when all done, finish the routine 
load task
+                    --_inflight_cnt;
+                    if (_inflight_cnt == 0 && is_consume_finished()) {

Review Comment:
   use fetch_sub(1) to avoid multi threads competition.



-- 
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]

Reply via email to