You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "sashapolo (via GitHub)" <gi...@apache.org> on 2023/04/04 14:54:47 UTC

[GitHub] [ignite-3] sashapolo opened a new pull request, #1899: IGNITE-19179 Make logical topology rejoins idempotent

sashapolo opened a new pull request, #1899:
URL: https://github.com/apache/ignite-3/pull/1899

   https://issues.apache.org/jira/browse/IGNITE-19179


-- 
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: notifications-unsubscribe@ignite.apache.org

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


[GitHub] [ignite-3] sashapolo commented on a diff in pull request #1899: IGNITE-19179 Make logical topology rejoins idempotent

Posted by "sashapolo (via GitHub)" <gi...@apache.org>.
sashapolo commented on code in PR #1899:
URL: https://github.com/apache/ignite-3/pull/1899#discussion_r1159412354


##########
modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/api/LogicalNode.java:
##########
@@ -79,10 +78,9 @@ public Map<String, String> nodeAttributes() {
         return nodeAttributes;
     }
 
-    /** {@inheritDoc} */
-    @Override
-    public String toString() {
-        // TODO: S.toString for inherited classes do not work properly https://issues.apache.org/jira/browse/IGNITE-19183
-        return S.toString(LogicalNode.class, this);
-    }
+    // TODO: S.toString for inherited classes do not work properly https://issues.apache.org/jira/browse/IGNITE-19183
+    //    @Override
+    //    public String toString() {
+    //        return S.toString(LogicalNode.class, this);
+    //    }

Review Comment:
   I didn't know what we used in Ignite 2 =(



-- 
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: notifications-unsubscribe@ignite.apache.org

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


[GitHub] [ignite-3] ibessonov commented on a diff in pull request #1899: IGNITE-19179 Make logical topology rejoins idempotent

Posted by "ibessonov (via GitHub)" <gi...@apache.org>.
ibessonov commented on code in PR #1899:
URL: https://github.com/apache/ignite-3/pull/1899#discussion_r1159395296


##########
modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/api/LogicalNode.java:
##########
@@ -79,10 +78,9 @@ public Map<String, String> nodeAttributes() {
         return nodeAttributes;
     }
 
-    /** {@inheritDoc} */
-    @Override
-    public String toString() {
-        // TODO: S.toString for inherited classes do not work properly https://issues.apache.org/jira/browse/IGNITE-19183
-        return S.toString(LogicalNode.class, this);
-    }
+    // TODO: S.toString for inherited classes do not work properly https://issues.apache.org/jira/browse/IGNITE-19183
+    //    @Override
+    //    public String toString() {
+    //        return S.toString(LogicalNode.class, this);
+    //    }

Review Comment:
   What was the reason for commenting this code? Maybe you forgot to uncomment it, I don't know



##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/rpc/ActionRequest.java:
##########
@@ -35,7 +34,6 @@ public interface ActionRequest extends Message {
     /**
      * @return Action's command.
      */
-    @Marshallable

Review Comment:
   Thank you very much! :+1: 



##########
modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/LogicalTopologyImpl.java:
##########
@@ -96,6 +96,10 @@ public void putNode(LogicalNode nodeToPut) {
             // This is an update. First simulate disappearance, then appearance will be fired.
             snapshot = new LogicalTopologySnapshot(snapshot.version() + 1, mapByName.values());
 
+            if (LOG.isInfoEnabled()) {

Review Comment:
   I would like to comment the code above.
   ```
               if (oldNode.id().equals(nodeToPut.id())) {
                   // We already have this node, nothing needs to be changed.
                   return;
               }
   ```
   How is it possible?



-- 
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: notifications-unsubscribe@ignite.apache.org

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


[GitHub] [ignite-3] sashapolo commented on a diff in pull request #1899: IGNITE-19179 Make logical topology rejoins idempotent

Posted by "sashapolo (via GitHub)" <gi...@apache.org>.
sashapolo commented on code in PR #1899:
URL: https://github.com/apache/ignite-3/pull/1899#discussion_r1159404624


##########
modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/api/LogicalNode.java:
##########
@@ -79,10 +78,9 @@ public Map<String, String> nodeAttributes() {
         return nodeAttributes;
     }
 
-    /** {@inheritDoc} */
-    @Override
-    public String toString() {
-        // TODO: S.toString for inherited classes do not work properly https://issues.apache.org/jira/browse/IGNITE-19183
-        return S.toString(LogicalNode.class, this);
-    }
+    // TODO: S.toString for inherited classes do not work properly https://issues.apache.org/jira/browse/IGNITE-19183
+    //    @Override
+    //    public String toString() {
+    //        return S.toString(LogicalNode.class, this);
+    //    }

Review Comment:
   Please have a look at the ticket in the TODO above. Current implementation simply prints `LogicalNode {}` hiding all important information, so I'd like to use `toString` from `ClusterNode` instead.



-- 
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: notifications-unsubscribe@ignite.apache.org

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


[GitHub] [ignite-3] sashapolo commented on a diff in pull request #1899: IGNITE-19179 Make logical topology rejoins idempotent

Posted by "sashapolo (via GitHub)" <gi...@apache.org>.
sashapolo commented on code in PR #1899:
URL: https://github.com/apache/ignite-3/pull/1899#discussion_r1159406999


##########
modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/LogicalTopologyImpl.java:
##########
@@ -96,6 +96,10 @@ public void putNode(LogicalNode nodeToPut) {
             // This is an update. First simulate disappearance, then appearance will be fired.
             snapshot = new LogicalTopologySnapshot(snapshot.version() + 1, mapByName.values());
 
+            if (LOG.isInfoEnabled()) {

Review Comment:
   This is to make this Raft command idempotent



-- 
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: notifications-unsubscribe@ignite.apache.org

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


[GitHub] [ignite-3] ibessonov commented on a diff in pull request #1899: IGNITE-19179 Make logical topology rejoins idempotent

Posted by "ibessonov (via GitHub)" <gi...@apache.org>.
ibessonov commented on code in PR #1899:
URL: https://github.com/apache/ignite-3/pull/1899#discussion_r1159409014


##########
modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/api/LogicalNode.java:
##########
@@ -79,10 +78,9 @@ public Map<String, String> nodeAttributes() {
         return nodeAttributes;
     }
 
-    /** {@inheritDoc} */
-    @Override
-    public String toString() {
-        // TODO: S.toString for inherited classes do not work properly https://issues.apache.org/jira/browse/IGNITE-19183
-        return S.toString(LogicalNode.class, this);
-    }
+    // TODO: S.toString for inherited classes do not work properly https://issues.apache.org/jira/browse/IGNITE-19183
+    //    @Override
+    //    public String toString() {
+    //        return S.toString(LogicalNode.class, this);
+    //    }

Review Comment:
   This is so weird. In Ignite 2, we constantly used `, "super", super.toString()`, right? Why don't we do the same thing? That's a one line fix



-- 
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: notifications-unsubscribe@ignite.apache.org

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


[GitHub] [ignite-3] sashapolo commented on a diff in pull request #1899: IGNITE-19179 Make logical topology rejoins idempotent

Posted by "sashapolo (via GitHub)" <gi...@apache.org>.
sashapolo commented on code in PR #1899:
URL: https://github.com/apache/ignite-3/pull/1899#discussion_r1159403240


##########
modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/LogicalTopologyImpl.java:
##########
@@ -96,6 +96,10 @@ public void putNode(LogicalNode nodeToPut) {
             // This is an update. First simulate disappearance, then appearance will be fired.
             snapshot = new LogicalTopologySnapshot(snapshot.version() + 1, mapByName.values());
 
+            if (LOG.isInfoEnabled()) {

Review Comment:
   It is possible because a node may try to re-join (e.g. after CMG leader change)



-- 
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: notifications-unsubscribe@ignite.apache.org

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


[GitHub] [ignite-3] ibessonov merged pull request #1899: IGNITE-19179 Make logical topology rejoins idempotent

Posted by "ibessonov (via GitHub)" <gi...@apache.org>.
ibessonov merged PR #1899:
URL: https://github.com/apache/ignite-3/pull/1899


-- 
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: notifications-unsubscribe@ignite.apache.org

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