You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/07/02 05:24:15 UTC

[GitHub] [incubator-doris] wutiangan commented on a change in pull request #4002: [Bug] Cancel the query if OlapScanner prepare failed

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org