Gabriel39 commented on code in PR #30082: URL: https://github.com/apache/doris/pull/30082#discussion_r1462621063
########## be/src/pipeline/pipeline_x/operator.cpp: ########## @@ -541,20 +541,23 @@ Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_s COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time()); // if the init failed, the _writer may be nullptr. so here need check if (_writer) { - RETURN_IF_ERROR(_writer->get_writer_status()); + Status st = _writer->get_writer_status(); + if (exec_status.ok()) { + _writer->force_close(state->is_cancelled() ? Status::Cancelled("Cancelled") + : Status::Cancelled("force close")); + } else { + _writer->force_close(exec_status); + } + // If there is an error in process_block thread, then we should get the writer + // status before call force_close. For example, the thread may failed in commit + // transaction. + if (!st.ok()) { Review Comment: RETURN_IF_ERROR -- 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