HDDS-1940. Closing open container via scmcli gives false error message. #153
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Before this patch, to close a container the scmcli (client) was using
notifyObjectStageChangeto inform SCM that a container is getting closed, connects to datanode directly and closes the container and again informs SCM that the container has been closed.After the introduction of
IncrementalContainerReportSCM received the state change of a container from datanode as soon as a datanode closes it and the container is marked as CLOSED in SCM. There is no need for a client to callnotifyObjectStageChangeto mark the container as CLOSED.We don't need
notifyObjectStageChangeAPI anymore, as SCM learns about the state change from datanodes directly.This change removes
notifyObjectStageChangeand addscloseContainerAPI toSCMClientProtocolServerWhat is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-1940
How was this patch tested?
Deployed a three node cluster and manually verified close container command.
Note
Incompatible Change: There are proto structure changes