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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to