You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/09/08 09:38:26 UTC

[GitHub] [ozone] guihecheng commented on a change in pull request #2623: HDDS-5725. Catch possible AlreadyExistsException for create pipeline command.

guihecheng commented on a change in pull request #2623:
URL: https://github.com/apache/ozone/pull/2623#discussion_r704250279



##########
File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/CreatePipelineCommandHandler.java
##########
@@ -108,9 +108,13 @@ public void handle(SCMCommand command, OzoneContainer ozoneContainer,
             pipelineID);
       }
     } catch (IOException e) {
-      LOG.error("Can't create pipeline {} {} {}",
-          createCommand.getReplicationType(),
-          createCommand.getFactor(), pipelineID, e);
+      // The server.addGroup may exec after a getGroupManagementApi call
+      // from another peer, so we may got an AlreadyExistsException.
+      if (!(e.getCause() instanceof AlreadyExistsException)) {
+        LOG.error("Can't create pipeline {} {} {}",
+            createCommand.getReplicationType(),
+            createCommand.getFactor(), pipelineID, e);
+      }

Review comment:
       @JacksonYao287 hmmm, this might be slightly different from the case in HDDS-5726, because the duplicate handling is intended behavior, and we "// do not log" in the rpc reply handling code so we do not log here either.




-- 
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: issues-unsubscribe@ozone.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org