Skip to content

HDDS-8473. ReplicationManager: Clear ContainerReplicaPendingOps when RM goes to running state#4644

Merged
siddhantsangwan merged 1 commit intoapache:masterfrom
sodonnel:HDDS-8473
May 5, 2023
Merged

HDDS-8473. ReplicationManager: Clear ContainerReplicaPendingOps when RM goes to running state#4644
siddhantsangwan merged 1 commit intoapache:masterfrom
sodonnel:HDDS-8473

Conversation

@sodonnel
Copy link
Contributor

@sodonnel sodonnel commented May 3, 2023

What changes were proposed in this pull request?

ContainerReplicaPendingOps contains a record of all the pending replications which are waiting to complete across the cluster. When SCM steps down as a leader, and a new one takes over, the pending commands on the datanodes are dropped as they check the leader term before they are processed.

This means the contents of ContainerReplicaPendingOps is not needed if the SCM fails back to the original node. Therefore, if the SCM becomes active again, we should clear the pending ops when RM is transitioning to the RUNNING state.

What is the link to the Apache JIRA

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

How was this patch tested?

New unit tests added.

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @sodonnel for the patch, LGTM.

@adoroszlai adoroszlai requested a review from siddhantsangwan May 3, 2023 12:11
Copy link
Contributor

@siddhantsangwan siddhantsangwan left a comment

Choose a reason for hiding this comment

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

Looks good!

@siddhantsangwan
Copy link
Contributor

Thanks @sodonnel for the PR and @adoroszlai for the review. Merging this.

@siddhantsangwan siddhantsangwan merged commit fe10a99 into apache:master May 5, 2023
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