wutiangan commented on a change in pull request #4002: URL: https://github.com/apache/incubator-doris/pull/4002#discussion_r448755605
########## File path: be/src/exec/olap_scan_node.cpp ########## @@ -681,7 +681,11 @@ Status OlapScanNode::start_scan_thread(RuntimeState* state) { } OlapScanner* scanner = new OlapScanner( state, this, _olap_scan_node.is_preaggregation, _need_agg_finalize, *scan_range, scanner_ranges); + // add scanner to pool before doing prepare. + // so that scanner can be automatically deconstructed if prepare failed. _scanner_pool->add(scanner); Review comment: It doesn't matter whether you add the scanner to the pool before or after doing prepare. if you put scanner preparing before add the scanner_pool,the scanner will be decontruced. ---------------------------------------------------------------- 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. 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