zhangstar333 commented on code in PR #66841:
URL: https://github.com/apache/doris/pull/66841#discussion_r3800661921
##########
be/src/exec/rowid_fetcher.cpp:
##########
@@ -927,13 +1001,26 @@ Status RowIdStorageReader::read_batch_external_row(
RETURN_IF_ERROR(remote_scan_sched->submit_scan_task(
SimplifiedScanTask(
[&, idx, scan_info]() -> Status {
+ Defer complete_task {[&]() {
+ semaphore.release();
+ if (++producer_count ==
scan_rows.size()) {
+ std::lock_guard<std::mutex>
lock(mtx);
+ cv.notify_one();
+ }
+ }};
const auto& [row_ids, file_mapping] =
scan_info;
- return
read_external_row_from_file_mapping(
+ auto status =
read_external_row_from_file_mapping(
idx, row_ids, file_mapping,
slots, query_id,
runtime_state, scan_blocks,
row_id_block_idx,
fetch_statistics,
rpc_scan_params,
- colname_to_slot_id,
producer_count,
- scan_rows.size(), semaphore,
cv, mtx, tuple_desc);
+ colname_to_slot_id,
tuple_desc);
+ if (!status.ok()) {
+ std::lock_guard<std::mutex>
lock(mtx);
+ if (scan_status.ok()) {
+ scan_status = status;
+ }
+ }
+ return status;
Review Comment:
fixed
--
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]