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



##########
File path: 
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/ClosePipelineCommandHandler.java
##########
@@ -68,12 +69,15 @@ public void handle(SCMCommand command, OzoneContainer 
ozoneContainer,
     final DatanodeDetails dn = context.getParent().getDatanodeDetails();
     ClosePipelineCommand closePipelineCommand = (ClosePipelineCommand) command;
     final PipelineID pipelineID = closePipelineCommand.getPipelineID();
+    final HddsProtos.PipelineID pipelineIdProto = pipelineID.getProtobuf();
 
     try {
       XceiverServerSpi server = ozoneContainer.getWriteChannel();
-      server.removeGroup(pipelineID.getProtobuf());
-      LOG.info("Close Pipeline {} command on datanode {}.", pipelineID,
-          dn.getUuidString());
+      if (server.isExist(pipelineIdProto)) {
+        server.removeGroup(pipelineIdProto);
+        LOG.info("Close Pipeline {} command on datanode {}.", pipelineID,
+            dn.getUuidString());
+      }

Review comment:
       @sodonnel this makes sense since this is a special case, will update, 
thanks~




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to