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

   ## Proposed changes
   
   ### question
   When replay some 
   ```
   Operation Type 201
   java.lang.NullPointerException: null at 
org.apache.doris.load.routineload.RoutineLoadManager.replayChangeRoutineLoadJob(RoutineLoadManager.java:726)
 ~[doris-fe.jar:1.2-SNAPSHOT]
           at org.apache.doris.persist.EditLog.loadJournal(EditLog.java:669) 
~[doris-fe.jar:1.2-SNAPSHOT]
           at org.apache.doris.catalog.Env.replayJournal(Env.java:2513) 
~[doris-fe.jar:1.2-SNAPSHOT]
           at org.apache.doris.catalog.Env.transferToMaster(Env.java:1285) 
~[doris-fe.jar:1.2-SNAPSHOT]
           at org.apache.doris.catalog.Env.access$1200(Env.java:282) 
~[doris-fe.jar:1.2-SNAPSHOT]
           at org.apache.doris.catalog.Env$4.runOneCycle(Env.java:2429) 
~[doris-fe.jar:1.2-SNAPSHOT]
           at org.apache.doris.common.util.Daemon.run(Daemon.java:116) 
~[doris-fe.jar:1.2-SNAPSHOT] 
   ```
   ### why this happened
   it may cause the editLog out of order in the following scenarios:
   thread A: create job and record job meta
   thread B: change job state and persist in editlog according to meta
   thread A: persist in editlog
   
   which will cause null pointer exception when replaying editLog
   
   ### how to solve this problem
   Use lock to make sure record meta in memory and write editlog is atomicity, 
when pause or stop the job, these two states must be completed simultaneously 
when the job is visible.
   
   <!--Describe your changes.-->
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 
[d...@doris.apache.org](mailto:d...@doris.apache.org) 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: 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