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

Support for Helix Auto Registration #2982

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

mudit-saxena
Copy link
Contributor

@mudit-saxena mudit-saxena commented Jan 13, 2025

Summary

Support for Helix Auto Registration. This will enable Ambry DataNodes to auto-join Helix cluster. AutoRegistration changes were available in [email protected] which is only Java11 compatible so I had to pin down dependency of this version to Java8 supported snapshot

Testing

./gradlew clean build

@@ -96,7 +101,14 @@ public DataNodeConfigSource getDataNodeConfigSource(ClusterMapConfig clusterMapC
* @return a new instance of {@link HelixManager}.
*/
HelixManager buildZKHelixManager(String clusterName, String instanceName, InstanceType instanceType, String zkAddr) {
return HelixManagerFactory.getZKHelixManager(clusterName, instanceName, instanceType, zkAddr);
HelixManagerProperty participantHelixProperty = new HelixManagerProperty.Builder().setDefaultInstanceConfigBuilder(
Copy link
Contributor

Choose a reason for hiding this comment

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

You need to create a flag in config to switch b/w old logic and new logic.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also you can add a comment explaining what is autoregistration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no need for flag here as we are not changing the way we connect to helix. In this we are providing an InstanceConfig as extra configuration while connection

Copy link
Contributor

Choose a reason for hiding this comment

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

This change will be tested in EI for sometime. We will need prod deployments to go through while wait for validation. And if we encounter some issue, we can just turn off the the flag.

Copy link
Contributor Author

@mudit-saxena mudit-saxena Jan 30, 2025

Choose a reason for hiding this comment

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

There is no auto registration at this point. Auto registration will have two requisites after this enabling cloud config and taking dependency on helix-cloud in closed.

Now for this specific change, it is change to the factory method on how we instantiate the HelixManager. I have added an additional test as safety check.

I don't think there should be any issue due to this but I can hold off from merging until I test on perf

Copy link
Contributor

Choose a reason for hiding this comment

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

sure, check if this is not getting used in VCR too.

Copy link
Contributor

@manbearpig1996 manbearpig1996 left a comment

Choose a reason for hiding this comment

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

Looks overall good to me. Added one minor comment.

Copy link
Contributor

@manbearpig1996 manbearpig1996 left a comment

Choose a reason for hiding this comment

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

LGTM

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