yiguolei commented on code in PR #33229: URL: https://github.com/apache/doris/pull/33229#discussion_r1549591914
########## be/src/vec/spill/spill_writer.cpp: ########## @@ -76,7 +71,7 @@ Status SpillWriter::write(const Block& block, size_t& written_bytes) { auto tmp_block = block.clone_empty(); const auto& src_data = block.get_columns_with_type_and_name(); - for (size_t row_idx = 0; row_idx < rows;) { + for (size_t row_idx = 0; row_idx < rows && !state->is_cancelled();) { Review Comment: There is some atomic variable in state is cancelled method and maybe some lock. I think you do not need check it every row, maybe every 4096 rows. -- 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