kaijchen commented on code in PR #845:
URL: https://github.com/apache/ratis/pull/845#discussion_r1139932774
##########
ratis-server/src/main/java/org/apache/ratis/server/impl/TransferLeadership.java:
##########
@@ -151,29 +150,29 @@ private String tryTransferLeadership(LeaderStateImpl
leaderState, Context contex
return "LogAppender for transferee " + transferee + " is null";
}
final FollowerInfo follower = appender.getFollower();
- final String error = leaderState.sendStartLeaderElection(follower,
context.getLeaderLastEntry());
- if (error == null) {
- LOG.info("{}: sent StartLeaderElection to transferee {} immediately as
it already has up-to-date log",
+ if (follower == null) {
+ return "Follower for LogAppender" + appender + " is null";
Review Comment:
Removed, this was added in
https://github.com/apache/ratis/pull/845/commits/060df2c530dcb73344f18e4db45586861ba39d81
to match the old logic just in case.
--
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]