sadanand48 commented on code in PR #8600:
URL: https://github.com/apache/ozone/pull/8600#discussion_r2145411107


##########
hadoop-hdds/docs/content/feature/OM-HA.md:
##########
@@ -125,7 +125,23 @@ ozone om [global options (optional)] --bootstrap --force
 
 Note that using the _force_ option during bootstrap could crash the OM process 
if it does not have updated configurations.
 
+## Automatic Snapshot Installation for Stale Ozone Managers
+
+Sometimes an OM follower node may be offline or fall so far behind the leader 
OM's log that it cannot catch up by replaying individual log entries.  The OM 
HA implementation includes an automatic snapshot installation and recovery 
process for such cases.
+
+How it works:
+
+1. Leader determines that the follower is too far behind.
+2. Leader notifies the follower to catch up via snapshot.
+3. The follower downloads and installs the latest snapshot from the leader.
+4. After installing the snapshot, the follower OM resumes normal operation and 
log replication from the new state.
+
+This logic is implemented in the 
[`OzoneManagerStateMachine.notifyInstallSnapshotFromLeader()` 
method](https://github.com/apache/ozone/blob/931bc2d8a9e8e8595bb49034c03c14e2b15be865/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java#L521-L541).
+
+In most scenarios, stale OMs will recover automatically, even if they have 
missed a large number of operations.  Manual intervention (such as running 
`ozone om --bootstrap`) is only required when adding a new OM node to the 
cluster or when explicitly requested by support instructions.
+

Review Comment:
   ```suggestion
   Important Note on Ozone Manager (OM) Disk Space for Snapshots
   When an Ozone Manager (OM) acts as a follower in an HA setup, it downloads 
snapshot tarballs from the leader to its local metadata directory. Therefore, 
always ensure your OM disks have at least 2x the current OM database size to 
accommodate the existing data and incoming snapshots, preventing disk space 
issues and maintaining cluster stability.
   ```
   We could add this as a note.



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