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

[ISSUE #3833] optimization ZookeeperMetaService #4780

Merged
merged 1 commit into from
Feb 27, 2024
Merged

[ISSUE #3833] optimization ZookeeperMetaService #4780

merged 1 commit into from
Feb 27, 2024

Conversation

Ish1yu
Copy link
Contributor

@Ish1yu Ish1yu commented Feb 27, 2024

Fixes #3833

Motivation

a. Change to private modifier.
b. Repeat code extraction as method.

Modifications

make public to pravite
Extract public methods

Documentation

  • Does this pull request introduce a new feature? (no)

a. Change to private modifier.
b. Repeat code extraction as method.
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome to the Apache EventMesh community!!
This is your first PR in our project. We're very excited to have you onboard contributing. Your contributions are greatly appreciated!

Please make sure that the changes are covered by tests.
We will be here shortly.
Let us know if you need any help!

Want to get closer to the community?

WeChat Assistant WeChat Public Account Slack
Join Slack Chat

Mailing Lists:

Name Description Subscribe Unsubscribe Archive
Users User support and questions mailing list Subscribe Unsubscribe Mail Archives
Development Development related discussions Subscribe Unsubscribe Mail Archives
Commits All commits to repositories Subscribe Unsubscribe Mail Archives
Issues Issues or PRs comments and reviews Subscribe Unsubscribe Mail Archives

Copy link
Contributor Author

@Ish1yu Ish1yu left a comment

Choose a reason for hiding this comment

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

i reviewed

if (CollectionUtils.isEmpty(instances)) {
continue;
}
private void findEventMeshInfo(String tipTitle, String clusterName,
Copy link
Member

Choose a reason for hiding this comment

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

I don't think tipTitle is needed here just for logging message.

Copy link
Member

Choose a reason for hiding this comment

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

The naming of tipTitle seems to indicate the name of its caller, only findEventMeshInfoByCluster for now. At least the naming of tipTitle is a bit confusing.

Is there any plan to add more callers like findEventMeshInfoBySubmodule and should we keep the tipTitle param? @Alonexc @mxsm

Copy link
Contributor Author

Choose a reason for hiding this comment

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

感谢大佬们指点
Thank you for your guidance. My consideration is that the tipTitle here has two values, "findEventMeshInfoByCluster" and "findAllEventMeshInfo", whose call links are executed at different times. If there is an error, I am concerned that it may differ from the previous log printing rules

Copy link
Contributor

@Alonexc Alonexc left a comment

Choose a reason for hiding this comment

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

LGTM

@mxsm mxsm merged commit 713f7c6 into apache:master Feb 27, 2024
9 checks passed
@xwm1992 xwm1992 added this to the 1.11.0 milestone Dec 18, 2024
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.

[Enhancement] Do some code optimization.[ZookeeperMetaService]
6 participants