You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by GitBox <gi...@apache.org> on 2022/03/16 16:43:06 UTC

[GitHub] [ratis] szetszwo commented on a change in pull request #622: RATIS-1551. Suppport listener in setConfiguration

szetszwo commented on a change in pull request #622:
URL: https://github.com/apache/ratis/pull/622#discussion_r828090346



##########
File path: ratis-server/src/main/java/org/apache/ratis/server/impl/LeaderStateImpl.java
##########
@@ -235,6 +235,7 @@ boolean removeAll(Collection<LogAppender> c) {
   private volatile ConfigurationStagingState stagingState;
   private List<List<RaftPeerId>> voterLists;
   private final Map<RaftPeerId, FollowerInfo> peerIdFollowerInfoMap = new ConcurrentHashMap<>();
+  private final Map<RaftPeerId, FollowerInfo> peerIdListenerInfoMap = new ConcurrentHashMap<>();

Review comment:
       Let's just use peerIdFollowerInfoMap for now.  The idea is to use conf *only* to distinguish Listeners from Followers.  If we create more data structures, we need to update them when the conf is changed.  It is hard to make everything correct.




-- 
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: issues-unsubscribe@ratis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org