Skip to content

Conversation

@ashishkumar50
Copy link
Contributor

What changes were proposed in this pull request?

When container state is DELETED in SCM, and if any DN reports replica which is CLOSED and non-empty. And if replica bcs-id is less or equal to container sequence id, in this case SCM should trigger delete replica to DN. This will reduce orphan containers in the cluster.

What is the link to the Apache JIRA

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

How was this patch tested?

Unit tests

@ashishkumar50 ashishkumar50 marked this pull request as ready for review January 14, 2026 08:13
@rich7420
Copy link
Contributor

@ashishkumar50 thanks for the patch!

@rich7420
Copy link
Contributor

It seems the three test methods (testDeletedContainerWithStaleClosedReplicaRatis, testDeletedContainerWithLowerBcsidStaleReplicaRatis, and testDeletedECContainerWithStaleClosedReplicaShouldNotForceDelete) share duplicated code for creating ContainerReportHandler, building ContainerReportsProto, sending messages via reportHandler.onMessage(), and verifying DeleteContainerCommand. Could we try to extract a helper method like sendReportAndVerifyDeleteCommand() or something that handles the common setup and verification logic?

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.

3 participants