morningman commented on a change in pull request #5768:
URL: https://github.com/apache/incubator-doris/pull/5768#discussion_r630696320
##########
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:
If scanner is not opened, we need to take care of "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]