smengcl opened a new pull request, #11480: URL: https://github.com/apache/ozone/pull/11480
Generated-by: Claude Code (Opus 5.5) ## What changes were proposed in this pull request? `NodeStateManager` schedules its health check as a one-shot task `ozone.scm.heartbeat.thread.interval` (3s by default) in the future, and reschedules it after each run. `close()` calls `executorService.shutdown()`, which still lets already scheduled delayed tasks run, and then `awaitTermination`. As a result `close()` blocks until the pending health check fires, up to 3s. This delays every SCM stop, and every test that closes a real `SCMNodeManager` pays the wait once per test. This PR cancels the pending health check in `close()` before shutting down the executor. Test class time in CI, four recent master runs compared to a run of this fix on my fork: | Test class | master (s) | with fix (s) | |---|---|---| | `TestDeletedBlockLog` | 99 to 100 | 16.0 | | `TestSCMNodeManager` | 118 to 119 | 54.5 | | `TestSCMBlockProtocolServer` | 52 | 9.2 | | `TestIncrementalContainerReportHandler` | 38 | 3.2 | | `TestReconNodeManager` | 30 | 3.2 | | `TestDeadNodeHandler` | 15 | 5.2 | ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-16926 ## How was this patch tested? - Added `TestNodeStateManager#testCloseDoesNotWaitForPendingHealthCheck`. It fails without the fix (`close()` takes 3s). - CI on my fork for the fix without the new test (timings above): https://github.com/smengcl/hadoop-ozone/actions/runs/38185568206 - CI on my fork for this branch: https://github.com/smengcl/hadoop-ozone/actions/runs/38204072348 🤖 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
