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

   ### error log
   
   When the task has not yet started scheduling, there is no transaction status 
at this time. Therefore the query will cause an NPE exception
   ```
   2023-10-07 13:52:16,883 WARN (mysql-nio-pool-3|1310) 
[StmtExecutor.executeByLegacy():807] execute Exception. stmt[1368, 
fc075cfd62aa4459-a8014ca6b5f574fa]
   java.lang.NullPointerException: null
        at 
org.apache.doris.load.routineload.RoutineLoadJob.lambda$getTasksShowInfo$6(RoutineLoadJob.java:1452)
 ~[classes/:?]
        at java.util.ArrayList.forEach(ArrayList.java:1259) ~[?:1.8.0_362]
        at 
org.apache.doris.load.routineload.RoutineLoadJob.getTasksShowInfo(RoutineLoadJob.java:1450)
 ~[classes/:?]
        at 
org.apache.doris.qe.ShowExecutor.handleShowRoutineLoadTask(ShowExecutor.java:1605)
 ~[classes/:?]
        at org.apache.doris.qe.ShowExecutor.execute(ShowExecutor.java:316) 
~[classes/:?]
        at org.apache.doris.qe.StmtExecutor.handleShow(StmtExecutor.java:2208) 
~[classes/:?]
        at 
org.apache.doris.qe.StmtExecutor.executeByLegacy(StmtExecutor.java:775) 
~[classes/:?]
        at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:468) 
~[classes/:?]
        at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:438) 
~[classes/:?]
        at 
org.apache.doris.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:353) 
~[classes/:?]
        at 
org.apache.doris.qe.ConnectProcessor.dispatch(ConnectProcessor.java:501) 
~[classes/:?]
        at 
org.apache.doris.qe.ConnectProcessor.processOnce(ConnectProcessor.java:752) 
~[classes/:?]
        at 
org.apache.doris.mysql.ReadListener.lambda$handleEvent$0(ReadListener.java:52) 
~[classes/:?]
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
~[?:1.8.0_362]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
~[?:1.8.0_362]
   
   ```
   ### Changes
   When the task has not yet started scheduling, that is, when txn_id is -1, 
the transaction status is set to null
   
   ### Test
   
   <img width="1096" alt="image" 
src="https://github.com/apache/doris/assets/16631152/55d6d97f-c8df-4b8b-82ea-a9661387aefe";>
   


-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to