xichen01 opened a new pull request, #9595: URL: https://github.com/apache/ozone/pull/9595
## What changes were proposed in this pull request? ### Context If a `BackgroundService` task takes longer than the interval, the next task will be executed immediately after the previous task completes. For previous discussion https://github.com/apache/ozone/pull/9185 Current PR Fix BackgroundService to make it follow scheduleWithFixedDelay mantics. ### Implementation: Moving `future.join();` from `BackgroundService#PeriodicalTask#run` to after task submission, and using `future.join();` to wait for all submitted tasks to complete, effectively transforms `PeriodicalTask#run` into a blocking function. This enables it to execute according to the `scheduleWithFixedDelay` pattern. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-14236 ## How was this patch tested? unit test. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
