liyuheng55555 commented on code in PR #14447:
URL: https://github.com/apache/iotdb/pull/14447#discussion_r1889544133


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/consensus/ConsensusPipeDataNodeDispatcher.java:
##########
@@ -64,6 +68,10 @@ public void createPipe(
       TSStatus status = configNodeClient.createPipe(req);
       if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != status.getCode()) {
         LOGGER.warn("Failed to create consensus pipe-{}, status: {}", 
pipeName, status);
+        // ignore idempotence logic
+        if (status.getMessage().contains(PIPE_ALREADY_EXIST_MSG)) {
+          return;
+        }

Review Comment:
   It seems that this depends on specific error messages. If the error messages 
on the ConfigNode side are changed, this might stop working. 
   
   Could this using a specific exception or error code instead?



##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/consensus/ConsensusPipeDataNodeDispatcher.java:
##########
@@ -111,6 +119,10 @@ public void dropPipe(ConsensusPipeName pipeName) throws 
Exception {
       final TSStatus status = configNodeClient.dropPipe(pipeName.toString());
       if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != status.getCode()) {
         LOGGER.warn("Failed to drop consensus pipe-{}, status: {}", pipeName, 
status);
+        // ignore idempotence logic
+        if (status.getMessage().contains(PIPE_NOT_EXIST_MGS)) {
+          return;
+        }

Review Comment:
   here too



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