You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "Pengzna (via GitHub)" <gi...@apache.org> on 2024/10/28 15:16:18 UTC

[PR] [Region Migration]: Fix IoTV2 addRemotePeer stuck. [iotdb]

Pengzna opened a new pull request, #13936:
URL: https://github.com/apache/iotdb/pull/13936

   as title.


-- 
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: reviews-unsubscribe@iotdb.apache.org

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


Re: [PR] [Region Migration]: Fix IoTV2 addRemotePeer stuck. [iotdb]

Posted by "Pengzna (via GitHub)" <gi...@apache.org>.
Pengzna commented on PR #13936:
URL: https://github.com/apache/iotdb/pull/13936#issuecomment-2446418016

   @OneSizeFitsQuorum PTAL~


-- 
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: reviews-unsubscribe@iotdb.apache.org

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


Re: [PR] [Region Migration]: Fix IoTV2 addRemotePeer stuck. [iotdb]

Posted by "OneSizeFitsQuorum (via GitHub)" <gi...@apache.org>.
OneSizeFitsQuorum merged PR #13936:
URL: https://github.com/apache/iotdb/pull/13936


-- 
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: reviews-unsubscribe@iotdb.apache.org

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


Re: [PR] [Region Migration]: Fix IoTV2 addRemotePeer stuck. [iotdb]

Posted by "OneSizeFitsQuorum (via GitHub)" <gi...@apache.org>.
OneSizeFitsQuorum commented on code in PR #13936:
URL: https://github.com/apache/iotdb/pull/13936#discussion_r1822718995


##########
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/pipe/consensuspipe/ConsensusPipeManager.java:
##########
@@ -60,22 +63,65 @@ public ConsensusPipeManager(PipeConsensusConfig.Pipe config, ReplicateMode repli
 
   public void createConsensusPipe(Peer senderPeer, Peer receiverPeer) throws Exception {
     ConsensusPipeName consensusPipeName = new ConsensusPipeName(senderPeer, receiverPeer);
+    Triple<ImmutableMap<String, String>, ImmutableMap<String, String>, ImmutableMap<String, String>>
+        params = buildPipeParams(senderPeer, receiverPeer, null);
     dispatcher.createPipe(
-        consensusPipeName.toString(),
-        ImmutableMap.<String, String>builder()
-            .put(EXTRACTOR_KEY, config.getExtractorPluginName())
-            .put(EXTRACTOR_INCLUSION_KEY, CONSENSUS_EXTRACTOR_INCLUSION_VALUE)
-            .put(
-                EXTRACTOR_CONSENSUS_GROUP_ID_KEY,
-                consensusPipeName.getConsensusGroupId().toString())
-            .put(
-                EXTRACTOR_CONSENSUS_SENDER_DATANODE_ID_KEY,
-                String.valueOf(consensusPipeName.getSenderDataNodeId()))
-            .put(
-                EXTRACTOR_CONSENSUS_RECEIVER_DATANODE_ID_KEY,
-                String.valueOf(consensusPipeName.getReceiverDataNodeId()))
-            .put(EXTRACTOR_REALTIME_MODE_KEY, replicateMode.getValue())
-            .build(),
+        consensusPipeName.toString(), params.getLeft(), params.getMiddle(), params.getRight());
+  }
+
+  public void createConsensusPipe(

Review Comment:
   ignore me



-- 
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: reviews-unsubscribe@iotdb.apache.org

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


Re: [PR] [Region Migration]: Fix IoTV2 addRemotePeer stuck. [iotdb]

Posted by "OneSizeFitsQuorum (via GitHub)" <gi...@apache.org>.
OneSizeFitsQuorum commented on code in PR #13936:
URL: https://github.com/apache/iotdb/pull/13936#discussion_r1822579537


##########
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/pipe/consensuspipe/ConsensusPipeManager.java:
##########
@@ -60,22 +63,65 @@ public ConsensusPipeManager(PipeConsensusConfig.Pipe config, ReplicateMode repli
 
   public void createConsensusPipe(Peer senderPeer, Peer receiverPeer) throws Exception {
     ConsensusPipeName consensusPipeName = new ConsensusPipeName(senderPeer, receiverPeer);
+    Triple<ImmutableMap<String, String>, ImmutableMap<String, String>, ImmutableMap<String, String>>
+        params = buildPipeParams(senderPeer, receiverPeer, null);
     dispatcher.createPipe(
-        consensusPipeName.toString(),
-        ImmutableMap.<String, String>builder()
-            .put(EXTRACTOR_KEY, config.getExtractorPluginName())
-            .put(EXTRACTOR_INCLUSION_KEY, CONSENSUS_EXTRACTOR_INCLUSION_VALUE)
-            .put(
-                EXTRACTOR_CONSENSUS_GROUP_ID_KEY,
-                consensusPipeName.getConsensusGroupId().toString())
-            .put(
-                EXTRACTOR_CONSENSUS_SENDER_DATANODE_ID_KEY,
-                String.valueOf(consensusPipeName.getSenderDataNodeId()))
-            .put(
-                EXTRACTOR_CONSENSUS_RECEIVER_DATANODE_ID_KEY,
-                String.valueOf(consensusPipeName.getReceiverDataNodeId()))
-            .put(EXTRACTOR_REALTIME_MODE_KEY, replicateMode.getValue())
-            .build(),
+        consensusPipeName.toString(), params.getLeft(), params.getMiddle(), params.getRight());
+  }
+
+  public void createConsensusPipe(

Review Comment:
   Do we necessarily know that an rpc sent to another node is not a coordinator? In this case, there is no need to add any parameters, and the sender and coordinator can be directly processed on the receiving side according to the inequality



-- 
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: reviews-unsubscribe@iotdb.apache.org

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