ArafatKhan2198 commented on code in PR #10617:
URL: https://github.com/apache/ozone/pull/10617#discussion_r3542547226
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMStateMachine.java:
##########
@@ -380,13 +385,69 @@ public void notifyTermIndexUpdated(long term, long index)
{
}
}
- if (currentLeaderTerm.get() == term) {
- // This means after a restart, all pending transactions have been
applied.
+ // As committed entries are applied (e.g. a restarted follower catching
up),
+ // start the datanode protocol server once we are caught up with the
leader's
+ // committed index. No-op once the server has already been started.
+ tryStartDNServerAndRefreshSafeMode();
Review Comment:
You're right that a restarted follower can catch up by applying
data-carrying entries through `applyTransaction`, which don't go through
`notifyTermIndexUpdated`, so the catch-up check could be missed there. I've
added the call at the end of `applyTransaction`, right after
`updateLastAppliedTermIndex(...)` so the applied index is up to date when we
check.
--
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]