HappenLee commented on code in PR #46300: URL: https://github.com/apache/doris/pull/46300#discussion_r1905308426
########## be/src/pipeline/exec/partition_sort_source_operator.cpp: ########## @@ -92,15 +86,21 @@ Status PartitionSortSourceOperatorX::get_sorted_block(RuntimeState* state, SCOPED_TIMER(local_state._get_sorted_timer); //sorter output data one by one bool current_eos = false; - if (local_state._sort_idx < local_state._shared_state->partition_sorts.size()) { - RETURN_IF_ERROR(local_state._shared_state->partition_sorts[local_state._sort_idx]->get_next( - state, output_block, ¤t_eos)); + auto& sorters = local_state._shared_state->partition_sorts; + auto sorter_size = sorters.size(); + if (local_state._sort_idx < sorter_size) { + RETURN_IF_ERROR( + sorters[local_state._sort_idx]->get_next(state, output_block, ¤t_eos)); COUNTER_UPDATE(local_state._sorted_partition_output_rows_counter, output_block->rows()); } if (current_eos) { // current sort have eos, so get next idx - local_state._shared_state->partition_sorts[local_state._sort_idx].reset(nullptr); + sorters[local_state._sort_idx].reset(nullptr); local_state._sort_idx++; + if (local_state._sort_idx < sorter_size && + !sorters[local_state._sort_idx]->prepared_finish()) { + local_state._dependency->block(); Review Comment: maybe logical deadlock -- 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