Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDDS-8813. Prepare for dynamic config in ReplicationManager #4874

Merged
merged 1 commit into from Jun 13, 2023

Conversation

adoroszlai
Copy link
Contributor

What changes were proposed in this pull request?

Refactor ReplicationManager and related classes to prepare for dynamic reconfigurability. Avoid storing config in member variables.

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

How was this patch tested?

CI:
https://github.com/adoroszlai/hadoop-ozone/actions/runs/5235703783

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.

LGTM!

long intervalInMillis) {
super(replicationManager, intervalInMillis);
UnderReplicatedProcessor(ReplicationManager replicationManager,
Supplier<Duration> interval) {
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the reason for passing in a Supplier?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we simply pass the current value (long or Duration), an updated config value will not be reflected in the (Under|Over)ReplicatedProcessor. Alternatively, we could define an abstract method for the interval in UnhealthyReplicationProcessor, and override it in the subclasses, returning the current value of ReplicationManager's (under|over)ReplicatedInterval.

@adoroszlai adoroszlai merged commit 8ac62eb into apache:master Jun 13, 2023
30 checks passed
@adoroszlai adoroszlai deleted the HDDS-8813 branch June 13, 2023 05:49
@adoroszlai
Copy link
Contributor Author

Thanks @siddhantsangwan for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants