morningman commented on a change in pull request #4002:
URL: https://github.com/apache/incubator-doris/pull/4002#discussion_r449099844



##########
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:
       Why? the `scanner` here is created by `new` operator. How can it be 
deconstructed automatically?




----------------------------------------------------------------
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

Reply via email to