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 15:40:55 UTC
[GitHub] [incubator-doris] morningman commented on a change in pull request #4002: [Bug] Cancel the query if OlapScanner prepare failed
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org