majin1102 opened a new issue, #3242:
URL: https://github.com/apache/amoro/issues/3242

   ### What happened?
   
   OptimizerKeeper throws NPE if optimizer timeout exactly when ams restarted
   
   ### Affects Versions
   
   master
   
   ### What table formats are you seeing the problem on?
   
   Iceberg, Paimon, Mixed-Iceberg, Mixed-Hive
   
   ### What engines are you seeing the problem on?
   
   AMS
   
   ### How to reproduce
   
   1. shutdown one optimizer
   2. restart ams immediately(before timeout was detected)
   3. will see npe in ams log
   
   ### Relevant log output
   
   ```shell
   19:42:15.591 INFO org.apache.amoro.server.DefaultOptimizingService: 
OptimizerManagementService begin initializing
   19:42:15.598 INFO org.apache.amoro.server.DefaultOptimizingService: 
Optimizer OptimizerInstance{token=d279ff09-227b-4c9b-9dac-423beebcb58a, 
startTime=1728646931748, touchTime=1728646935099} has been expired, unregister 
it
   19:42:15.598 ERROR org.apache.amoro.server.DefaultOptimizingService: 
OptimizerKeeper has encountered a problem.
   java.lang.NullPointerException: null
        at 
org.apache.amoro.server.DefaultOptimizingService.unregisterOptimizer(DefaultOptimizingService.java:167)
 ~[classes/:?]
        at 
org.apache.amoro.server.DefaultOptimizingService.access$800(DefaultOptimizingService.java:87)
 ~[classes/:?]
        at 
org.apache.amoro.server.DefaultOptimizingService$OptimizerKeeper.run(DefaultOptimizingService.java:551)
 [classes/:?]
        at java.lang.Thread.run(Thread.java:750) [?:1.8.0_402]
   ```
   
   
   ### Anything else
   
   no
   
   ### Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's Code of Conduct


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

Reply via email to