Skip to content

Conversation

@chimney-lee
Copy link
Contributor

What changes were proposed in this pull request?

fix scmcli container delete not working

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-2534

How was this patch tested?

exec bin/ozone scmcli container delete <containerId>

Copy link
Contributor

@xiaoyuyao xiaoyuyao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note this only delete the container from the SCM container DB store. The container report from DN may still report the deleted container replicas. We need to either further send the delete to datanodes upon SCM cli container delete. Or add additional hanlding in ContainerReportHandler#processContainerReplicas to deal with ContainerNotFoundException by sending datanode container delete command via heatbeat.

@chimney-lee
Copy link
Contributor Author

@xiaoyuyao thanks for comment, should we remove the container in NodeStateMap with NodeStateMap#removeContainer while do SCMClientProtocolServer#deleteContainer. For that, After deal with ContainerNotFoundException in ContainerReportHandler#processContainerReplicas by sending datanode container delete command via heatbeat, then scm handling the first heartbeat from datanode, the NodeStateMap still contains the containerid. this cause the ContainerNotFoundException in ContainerReportHandler#processMissingReplicas, but after the handle of this heartbeat, the NodeStateMap will be updated.

@elek elek changed the title HDDS-2534.scmcli container delete not working HDDS-2534. scmcli container delete not working Dec 3, 2019
@elek
Copy link
Member

elek commented Dec 3, 2019

What's the plan with this patch? @xiaoyuyao Do you have any suggestion? Do we need to include the logic to delete the container in this patch?

@xiaoyuyao
Copy link
Contributor

xiaoyuyao commented Dec 3, 2019

Yes, the current patch delete container from SCM DB, container state manager still has the deleted container info in memory. Here are the issues:

  1. ContainerReportHandler will not hit ContainerNotFoundException.
  2. Container state manager won't get deleted container removed from in-memory map until a restart/reload.
  3. In-memory container state inconsistent with the SCM DB.

To solve this, we will need to keep track of the deleting status in SCM until the heartbeat from Dn confirm the deletion cmd execution on three datanodes. This will be similar to what we did for the block deletion log in SCM.

@adoroszlai
Copy link
Contributor

Closing as this is superseded by #389.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants