Cyrill commented on code in PR #6850:
URL: https://github.com/apache/ignite-3/pull/6850#discussion_r2513718281


##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/NodeImpl.java:
##########
@@ -3587,13 +3608,25 @@ public List<PeerId> listAliveLearners() {
     }
 
     @Override
-    public void addPeer(final PeerId peer, final Closure done) {
+    public void addPeer(final PeerId peer, long sequenceToken, final Closure 
done) {
         Requires.requireNonNull(peer, "Null peer");
         this.writeLock.lock();
         try {
             Requires.requireTrue(!this.conf.getConf().contains(peer), "Peer 
already exists in current configuration");
 
-            final Configuration newConf = new 
Configuration(this.conf.getConf());
+            // TODO https://issues.apache.org/jira/browse/IGNITE-26855 
Consider replacing '>' with '>='.
+            if (this.conf.getConf().getSequenceToken() > sequenceToken) {
+                LOG.info("Node: addPeer received stale configuration [node={}, 
peer={}, existing token={}, new token={}].",

Review Comment:
   what about this format?
   ```
   [node={}, from peers={} to peers={}, from learners={}, to learners={}, old 
token={}, new token={}].",
   ```
   fromLearners/toLearners/oldToken/newToken ?



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