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: [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]