You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ratis.apache.org by sz...@apache.org on 2023/03/22 08:20:24 UTC

[ratis] 08/18: RATIS-1814: The group info command of the Ratis shell does not show the listener (#852)

This is an automated email from the ASF dual-hosted git repository.

szetszwo pushed a commit to branch branch-2_readIndex
in repository https://gitbox.apache.org/repos/asf/ratis.git

commit 2fc1c83a6bb27f09a315906c212da3c1221245de
Author: qian0817 <qi...@gmail.com>
AuthorDate: Tue Mar 14 16:31:11 2023 +0800

    RATIS-1814: The group info command of the Ratis shell does not show the listener (#852)
    
    (cherry picked from commit 34a0740901e02b26298aac06295d4552169be788)
---
 .../src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java b/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java
index 6f761d1f3..c64aaebba 100644
--- a/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java
+++ b/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java
@@ -580,7 +580,10 @@ class RaftServerImpl implements RaftServer.Division,
       role.getLeaderState().ifPresent(
           leader -> leader.updateFollowerCommitInfos(commitInfoCache, infos));
     } else {
-      getRaftConf().getAllPeers().stream()
+      RaftConfigurationImpl raftConf = getRaftConf();
+      Stream.concat(
+              raftConf.getAllPeers(RaftPeerRole.FOLLOWER).stream(),
+              raftConf.getAllPeers(RaftPeerRole.LISTENER).stream())
           .map(RaftPeer::getId)
           .filter(id -> !id.equals(getId()))
           .map(commitInfoCache::get)