bharatviswa504 commented on a change in pull request #1494:
URL: https://github.com/apache/ozone/pull/1494#discussion_r642225571
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java
##########
@@ -166,6 +167,29 @@ public void notifyTermIndexUpdated(long currentTerm, long
index) {
computeAndUpdateLastAppliedIndex(index, currentTerm, null, false);
}
+ /**
+ * Called to notify state machine about configuration changes.
+ * Configurations changes include addition of newly bootstrapped OM.
+ */
+ @Override
+ public void notifyConfigurationChanged(long term, long index,
+ RaftProtos.RaftConfigurationProto newRaftConfiguration) {
+ List<RaftProtos.RaftPeerProto> newPeers =
+ newRaftConfiguration.getPeersList();
Review comment:
Looks like we need to call computeAndUpdateLastAppliedIndex. As
applyLogToStateMachine in StateMachineUpdater when configEntry, we call
stateMachine.event().notifyConfigurationChanged(next.getTerm(),
next.getIndex(), next.getConfigurationEntry());
As in OM StateMachine, we update lastAppliedIndex using
computeAndUpdateLastAppliedIndex.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]