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

   ## What changes were proposed in this pull request?
   Fixes OM bootstrap failure when the leader has purged Ratis logs and the new 
OM must install a checkpoint while still in BOOTSTRAPPING.
   
   When a 3rd OM is added with --bootstrap, Ratis can notify the new node to 
install a snapshot during setConfiguration staging. At that point omState is 
BOOTSTRAPPING, not RUNNING. installSnapshotFromLeader() rejected install 
because it only allowed isRunning(), so checkpoint download never started. 
Bootstrap then stalled in a retry loop (SNAPSHOT_UNAVAILABLE) and the new OM 
never joined the ring.
   
   This change allows checkpoint install during BOOTSTRAPPING as well as 
RUNNING. Install is still rejected during INITIALIZED and other pre-ready 
states (HDDS-15103). The existing testInstallSnapshot test hook is unchanged.
   
   Changes:
   
   OzoneManager.java: Replace isRunning() with isRunningOrBootstrapping() in 
the installSnapshotFromLeader() guard.
   TestOMRatisSnapshots.java: Add 
testBootstrapInstallSnapshotDuringBootstrapping — 2-OM cluster with purged 
logs, bootstrap a 3rd OM, assert install is accepted and v2 checkpoint download 
starts, then shut down before later install stages.
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-16057
   
   ## How was this patch tested?
   integration 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]

Reply via email to