xinyiZzz commented on a change in pull request #5768:
URL: https://github.com/apache/incubator-doris/pull/5768#discussion_r630798861
##########
File path: be/src/exec/olap_scan_node.cpp
##########
@@ -1368,9 +1375,14 @@ void OlapScanNode::scanner_thread(OlapScanner* scanner) {
cpu_watch.start();
Status status = Status::OK();
bool eos = false;
+ if (UNLIKELY(_transfer_done)) {
+ eos = true;
+ status = Status::Cancelled("Cancelled");
+ LOG(INFO) << "Scan thread cancelled, cause query done, scan thread
started to exit";
+ }
RuntimeState* state = scanner->runtime_state();
DCHECK(NULL != state);
- if (!scanner->is_open()) {
+ if (!eos && !scanner->is_open()) {
Review comment:
Modified to when _transfer_done` is True, the scan thread will exit
directly after starting,
and no longer execute the subsequent logic including the scanner's `close()`
method.
--
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]