avijayanhwx commented on a change in pull request #389: HDDS-2534. scmcli container delete not working URL: https://github.com/apache/hadoop-ozone/pull/389#discussion_r367111654
########## File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ContainerReportHandler.java ########## @@ -119,21 +127,33 @@ public void onMessage(final ContainerReportFromDatanode reportFromDatanode, * @param datanodeDetails Datanode from which this report was received * @param replicas list of ContainerReplicaProto */ - private void processContainerReplicas(final DatanodeDetails datanodeDetails, - final List<ContainerReplicaProto> replicas) { + private List<ContainerReplicaProto> processContainerReplicas( + final DatanodeDetails datanodeDetails, + final List<ContainerReplicaProto> replicas, + final EventPublisher publisher) { + List<ContainerReplicaProto> containers = new ArrayList<>(); for (ContainerReplicaProto replicaProto : replicas) { try { processContainerReplica(datanodeDetails, replicaProto); + containers.add(replicaProto); } catch (ContainerNotFoundException e) { - LOG.error("Received container report for an unknown container" + - " {} from datanode {}.", replicaProto.getContainerID(), - datanodeDetails, e); + LOG.info("Received container report for an unknown container" + + " {} from datanode {},delete it.", + replicaProto.getContainerID(), + datanodeDetails); + publisher.fireEvent( Review comment: +1 for @xiaoyuyao's description request. The delete container flow is quite important for Recon to work correctly and hence trying to understand this better. Will there be a case where a user will need to delete a container directly using SCM? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org