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:24:48 UTC

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

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



##########
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:
       ```suggestion
         } else { 
             LOG.info("pipelint {} has already exist", pipelineID);
         }
   ```
   better to log this issue




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