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-11388. Fix unnecessary call to the DB for ContainerBalancer#getBalancerStatusInfo #7224

Merged
merged 5 commits into from
Oct 24, 2024

Conversation

ivandika3
Copy link
Contributor

@ivandika3 ivandika3 commented Sep 20, 2024

What changes were proposed in this pull request?

ContainerBalancer#getBalancerStatusInfo can get the current running balancer configuration from the in-memory configuration, which is in sync with the backing DB. Also added lock in getBalancerStatusInfo.

What is the link to the Apache JIRA

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

How was this patch tested?

Unit test.

@ivandika3 ivandika3 self-assigned this Sep 20, 2024
@ivandika3
Copy link
Contributor Author

ivandika3 commented Sep 24, 2024

Seems container balancer acceptance test failed after this patch. Let me take a look first.

Edit: This is because shouldRun is not set in the in-memory ContainerBalancerConfigurationProto causing proto exception. The exception is an unchecked exception which was hard to detect, added a unit test for this.

@siddhantsangwan
Copy link
Contributor

@ivandika3 let me know when it's ready for review.

@ivandika3 ivandika3 marked this pull request as ready for review October 1, 2024 08:55
@ivandika3
Copy link
Contributor Author

@siddhantsangwan Hi, this patch is ready for review. Thank you.

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.

This is because shouldRun is not set in the in-memory ContainerBalancerConfigurationProto causing proto exception.

@ivandika3 good find there. This patch looks good. There's a conflict with testBalancer.robot that needs to be fixed.

# Conflicts:
#	hadoop-ozone/dist/src/main/smoketest/balancer/testBalancer.robot
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, pending green CI.

@ivandika3 ivandika3 merged commit 782ad62 into apache:master Oct 24, 2024
40 checks passed
@ivandika3
Copy link
Contributor Author

Thank you for the review @siddhantsangwan

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.

2 participants