HDDS-10113. UNHEALTHY replicas of QUASI_CLOSED container with unique origins should be handled during decommission #5984
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?
A
QUASI_CLOSEDcontainer may haveUNHEALTHYreplicas with the correct sequence ID which have unique origin Datanodes. If any of theseUNHEALTHYreplicas is being taken offline, then it needs to be replicated to another DN for decommission to progress. Currently, decommission will simply proceed without replication, and such anUNHEALTHYreplica will be lost.We try to save such
UNHEALTHYreplicas because in the future HDDS may have the ability to restore these replicas to a healthy state. Then, these replicas can be used to achieve quorum and close theQUASI_CLOSEDcontainer.This PR makes some changes in
VulnerableUnhealthyReplicasHandler. Previously, it was only queueing the container if the healthy ones didn't have the correct sequence ID. Now, it checks if:UNHEALTHYreplica has the correct sequence IDWhat is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-10113
How was this patch tested?
Added unit tests.