qian0817 commented on code in PR #673:
URL: https://github.com/apache/ratis/pull/673#discussion_r917818527


##########
ratis-server/src/main/java/org/apache/ratis/server/impl/LeaderStateImpl.java:
##########
@@ -951,9 +951,11 @@ private void yieldLeaderToHigherPriorityPeer() {
     for (LogAppender logAppender : senders.getSenders()) {
       final FollowerInfo followerInfo = logAppender.getFollower();
       final RaftPeerId followerID = followerInfo.getPeer().getId();
-      final RaftPeer follower = conf.getPeer(followerID);
+      final RaftPeer follower = conf.getPeer(followerID, 
RaftPeerRole.FOLLOWER);
       if (follower == null) {
-        LOG.error("{} the follower {} is not in the conf {}", this, 
server.getId(), conf);
+        if (conf.getPeer(followerID, RaftPeerRole.LISTENER) == null) {

Review Comment:
   `senders.getSenders()` will return all peers including the listener.



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

Reply via email to