sarvekshayr opened a new pull request, #12015:
URL: https://github.com/apache/ozone/pull/12015

   ## What changes were proposed in this pull request?
   SCM now shuts itself down, after a configurable delay, when Ratis shuts its 
Raft server down on its own (for example after a long JVM pause). It follows 
the datanode approach in HDDS-10749. It also handles a long backlog of 
transactions that would otherwise block shutdown.
   
   Files
   - ScmConfig.java: new key `hdds.scm.ratis.shutdown.timeout` (default 60s) 
with `getRatisShutdownTimeout()`.
   - SCMStateMachine.java:
     - `notifyServerShutdown` starts a one-shot timer when Ratis shuts down.
     - A 1-second watchdog polls the division's lifecycle state and starts the 
same timer on CLOSING or CLOSED. This covers a close stuck behind a large 
transaction backlog, when Ratis never calls the hooks.
     - On timeout, `scm.shutDown()` runs on a bounded thread. If it hangs past 
`ozone.service.shutdown.timeout`, the exit is forced with 
`ExitUtils.terminate(1, ...)`.
     - `close()` no longer exits immediately in the Ratis-initiated branch. It 
only logs, so the timer can apply. The decommission case still exits 0 at once.
   
   ## What is the link to the Apache JIRA
   [HDDS-17758](https://issues.apache.org/jira/browse/HDDS-17758)
   
   ## How was this patch tested?
   Added unit tests.
   


-- 
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