sumitagrawl commented on code in PR #10617:
URL: https://github.com/apache/ozone/pull/10617#discussion_r3549672303
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMStateMachine.java:
##########
@@ -278,34 +283,34 @@ public void notifyLeaderChanged(RaftGroupMemberId
groupMemberId,
return;
}
- currentLeaderTerm.set(scm.getScmHAManager().getRatisServer().getDivision()
- .getInfo().getCurrentTerm());
+ final boolean isLeader = groupMemberId.getPeerId().equals(newLeaderId);
- if (isStateMachineReady.compareAndSet(false, true)) {
- // refresh and validate safe mode rules if it can exit safe mode
- // if being leader, all previous term transactions have been applied
- // if other states, just refresh safe mode rules, and transaction keeps
flushing from leader
- // and does not depend on pending transactions.
- scm.getScmSafeModeManager().refreshAndValidate();
- }
Review Comment:
this is required to set true once follower is caughtup. This is further used
in safemode rule also as satisfied or not.
--
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]