smengcl commented on code in PR #11480:
URL: https://github.com/apache/ozone/pull/11480#discussion_r4244799063


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/NodeStateManager.java:
##########
@@ -885,6 +885,10 @@ private void fireHealthStateEvent(HddsProtos.NodeState 
health,
 
   @Override
   public void close() {
+    // Cancel the pending delayed health check, otherwise awaitTermination 
waits for it to fire.
+    if (healthCheckFuture != null) {
+      healthCheckFuture.cancel(false);

Review Comment:
   Fixed in f3052fcb0c0: the executor now has 
`setExecuteExistingDelayedTasksAfterShutdownPolicy(false)`, so `shutdown()` 
itself discards the delayed health check, including one rescheduled 
concurrently, and the separate `cancel` in `close()` is gone.
   
   _🤖 Addressed by [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]

Reply via email to