jerryshao opened a new pull request, #14016: URL: https://github.com/apache/gravitino/pull/14016
### What changes were proposed in this pull request? Guard both scheduled tasks in `JobManager`, `pullAndUpdateJobStatus` and `cleanUpStagingDirs`: - A failure in `MetalakeManager.listInUseMetalakes` is logged and ends the current run only. - Each metalake is processed in its own try, so a metalake that was disabled or dropped after being listed, or a store error while listing its jobs, only skips that metalake. - In the status poll, the `ownsJob` check is inside the per-job try. - The cleanup's per-job delete loop also catches `RuntimeException`, and its log names the metalake. ### Why are the changes needed? Both tasks are scheduled with `scheduleAtFixedRate`. Any exception escaping a run cancels all later runs, and the exception stays in a future nobody reads, so it is never logged. One transient store error, or disabling a metalake at the wrong moment, stopped all job status updates or staging cleanup until the server restarted. Fix: #14014 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Added unit tests to `TestJobManager` for both tasks: they recover after a failure to list metalakes, keep processing the other metalakes when one fails, and keep deleting other expired jobs when one delete fails unexpectedly. All five fail without this change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
