EJB persistent timers that were deferred during app start do not run when app finishes starting #21615
Labels
release bug
This bug is present in a released version of Open Liberty
release:22008
team:Zombie Apocalypse
Milestone
Describe the bug
EJB Persistent Timers that get deferred due the application not being started yet do not run after the application finishes starting.
Steps to Reproduce
Have a large, slowly-starting application with a number of persistent EJB timers around from a previous run. Start the server and if timing is right, the timers will never start running.
Expected behavior
EJB persistent timers that were deferred due to an unavailable application should run after the application becomes available again.
Diagnostic information:
Additional context
Timers are first put into a queue because they attempt to start while the server config is still being processed,
When the config update finishes, they are resubmitted,
Unfortunately, the application still isn't started at this point, and the timers are once again deferred,
Eventually the application starts, and the timers should be reattempted after this, but they aren't,
A good guess is that ApplicationTracker.addStartedApplication doesn't see any timers to run because ApplicationTracker.deferTask wasn't ever invoked for the tasks. There is no evidence in the trace of deferTask being invoked.
I only see one place in code where deferTask can be invoked,
It requires a non-null ownerForDeferredTask.
I see 2 places (both in the same method) where ownerForDeferredTask is assigned,
Notice the return statment from both of those if blocks. It prevents code flow from continuing, meaning that appTracker.deferTask is unreachable.
The text was updated successfully, but these errors were encountered: