Mryange opened a new pull request, #33444:
URL: https://github.com/apache/doris/pull/33444

   ## Proposed changes
   1.
   In the past, in ConnectContext's checkTimeout, if a timeout occurred and 
cancel was not passed PPlanFragmentCancelReason, it resulted in being set to 
Types.PPlanFragmentCancelReason.USER_CANCEL.
   
   
   ```java
       public void cancel() {
           cancel(Types.PPlanFragmentCancelReason.USER_CANCEL);
       }
   ```
   
   ```
   2024-03-29 13:11:11,683 WARN (connect-scheduler-check-timer-0|103) 
[ConnectContext.checkTimeout():921] kill query timeout, remote: 
172.30.0.32:50876, query timeout: 600000
   2024-03-29 13:11:11,683 WARN (connect-scheduler-check-timer-0|103) 
[ConnectContext.kill():877] kill query from 172.30.0.32:50876, kill mysql 
connection: false
   2024-03-29 13:10:39,686 WARN (connect-scheduler-check-timer-0|103) 
[Coordinator.cancel():1443] Cancel execution of query 
a82b68a3a1bc44b9-b4bc0254ac412006, this is a outside invoke
   2024-03-29 13:10:39,698 WARN (mysql-nio-pool-67|868) 
[ResultReceiver.getNext():102] Query a82b68a3a1bc44b9-b4bc0254ac412006 get 
result timeout, get result duration 599 ms
   2024-03-29 13:10:39,698 WARN (mysql-nio-pool-67|868) 
[ResultReceiver.updateCancelReason():194] Query 
a82b68a3a1bc44b9-b4bc0254ac412006 already has cancel reason: USER_CANCEL, new 
reason fetch data timeout will be ignored
   
   ```
   2.
   
   The ResultReceiver was canceled before getNext was called. The original code 
only set status.setStatus(Status.CANCELLED);, so there was no way to report a 
timeout error, only CANCELLED.
   
   ```
   2024-04-09 08:39:14,106 INFO (mysql-nio-pool-31|1394) 
[Coordinator.execInternal():681] dispatch result sink of query 
bb9431afba254d2f-81b33c36f9dc136e to TNetworkAddress(hostname:172.30.0.47, 
port:9060)
   2024-04-09 08:49:14,899 WARN (connect-scheduler-check-timer-0|102) 
[Coordinator.cancel():1443] Cancel execution of query 
bb9431afba254d2f-81b33c36f9dc136e, this is a outside invoke, cancelReason 
TIMEOUT
   2024-04-09 08:49:14,900 WARN (connect-scheduler-check-timer-0|102) 
[ResultReceiver.cancel():214] ResultReceiver of query 
bb9431afba254d2f-81b33c36f9dc136e cancel failed, typically means the future is 
finished
   2024-04-09 08:49:15,952 WARN (mysql-nio-pool-31|1394) 
[Coordinator.getNext():1303] Query bb9431afba254d2f-81b33c36f9dc136e 
coordinator get next fail, Cancelled, need cancel.
   2024-04-09 08:49:15,952 WARN (mysql-nio-pool-31|1394) 
[StmtExecutor.sendResult():1721] cancel fragment 
query_id:bb9431afba254d2f-81b33c36f9dc136e cause errCode = 2, detailMessage = 
Cancelled
   2024-04-09 08:49:18,818 WARN (thrift-server-pool-34|1681) 
[QeProcessorImpl.reportExecStatus():226] ReportExecStatus() runtime error, 
query bb9431afba254d2f-81b33c36f9dc136e with type SELECT does not exist
   ```
   
   
   
   <!--Describe your changes.-->
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 
[[email protected]](mailto:[email protected]) by explaining why you 
chose the solution you did and what alternatives you considered, etc...
   
   


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to