zhiqiang-hhhh commented on code in PR #40641: URL: https://github.com/apache/doris/pull/40641#discussion_r1770731230
########## be/src/vec/exec/scan/scanner_scheduler.cpp: ########## @@ -270,6 +272,10 @@ void ScannerScheduler::_scanner_scan(std::shared_ptr<ScannerContext> ctx, eos = true; break; } + if (max_run_time_watch.elapsed_time() / 1e6 > + config::doris_scanner_max_run_time_ms) { Review Comment: maybe `config::doris_scanner_max_run_time_ms * 1000 * 1000` is better. ########## be/src/vec/exec/scan/vscanner.cpp: ########## @@ -127,9 +127,11 @@ Status VScanner::get_block(RuntimeState* state, Block* block, bool* eof) { // 2. Filter the output block finally. { - auto* timer = _local_state->_filter_timer; - SCOPED_TIMER(timer); - RETURN_IF_ERROR(_filter_output_block(block)); + if (!block->empty()) { Review Comment: in what situation will the block in queue be empty? ########## be/src/vec/exec/scan/vfile_scanner.cpp: ########## @@ -333,8 +333,8 @@ Status VFileScanner::_get_block_wrapped(RuntimeState* state, Block* block, bool* // or not found in the file column schema. RETURN_IF_ERROR(_truncate_char_or_varchar_columns(block)); } - break; } + break; Review Comment: add comments to explain what happened ########## be/src/vec/exec/scan/scanner_scheduler.cpp: ########## @@ -286,6 +292,9 @@ void ScannerScheduler::_scanner_scan(std::shared_ptr<ScannerContext> ctx, LOG(WARNING) << "Scan thread read VScanner failed: " << status.to_string(); break; } + if (free_block->empty()) { Review Comment: why need this? -- 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