szetszwo commented on code in PR #1091: URL: https://github.com/apache/ratis/pull/1091#discussion_r1617700921
########## ratis-server/src/main/java/org/apache/ratis/server/impl/ConfigurationManager.java: ########## @@ -61,10 +61,10 @@ private void setCurrentConf(RaftConfigurationImpl currentConf) { } } - synchronized void addConfiguration(RaftConfiguration conf) { + synchronized void addConfiguration(RaftConfiguration conf, long commitIndex) { final long logIndex = conf.getLogEntryIndex(); final RaftConfiguration found = configurations.get(logIndex); - if (found != null) { + if (found != null && logIndex <= commitIndex) { Review Comment: > 7. B is elected as the new leader. The first thing B comes to power is to replicate a group configuration log L1 (old=[A,B,C], new=[A,B,C]) to establish its leader authority. @SzyWilliam , I see the problem now. This is similar to RATIS-2011. We should truncate the confs when truncating the log. -- 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-unsubscr...@ratis.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org