You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Xushaohong (via GitHub)" <gi...@apache.org> on 2023/04/14 03:08:08 UTC
[GitHub] [ozone] Xushaohong commented on a diff in pull request #4294: HDDS-7995. Support incremental snapshot on OM
Xushaohong commented on code in PR #4294:
URL: https://github.com/apache/ozone/pull/4294#discussion_r1166234619
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java:
##########
@@ -208,6 +209,31 @@ public void notifyConfigurationChanged(long term, long index,
ozoneManager.updatePeerList(newPeerIds);
}
+ /**
+ * Called to notify state machine about the snapshot install result.
+ * Used to trigger the cleanup of candidate DB dir.
+ * @param result InstallSnapshotResult
+ * @param snapshotIndex the index of installed snapshot
+ * @param peer the peer which fini
+ */
+ @Override
+ public void notifySnapshotInstalled(RaftProtos.InstallSnapshotResult result,
Review Comment:
It is the prerequisite for the incremental snapshot. The original notifyInstallSnapshot process only sends a disposable snapshot. Once we have incremental snapshots and will send more than one snapshot to the follower, the signal of termination is needed to indicate that the installation is completely done or failed.
Currently, it is only used to notify the follower to clean up the candidate dir, which will remain until the installation is completely done/failed.
1. Once the leader gets InstallSnapshotReply with `SNAPSHOT_INSTALLED`, it will trigger this event after confirming followerNextIndex ≥ its start Index( follower catches up)
2. Once the leader gets InstallSnapshotReply with `SNAPSHOT_UNAVAILABLE`, it will trigger this event.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org