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

check child is json or not in zookeeper.it will be continue if not. #14166

Merged
merged 29 commits into from May 21, 2024

Conversation

walkinggo
Copy link
Contributor

What is the purpose of the change

catch the exception when the url can't be deserialization.related issue

Brief changelog

add the json check when ANY_VALUE.equals(url.getServiceInterface()) at ZookeeperRegistry#doSubscribe.

Verifying this change

the child will work normal if the child is json.It can still work when dubbo-admin run.

Checklist

  • Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • GitHub Actions works fine on your own branch.

@walkinggo
Copy link
Contributor Author

@CrazyHZM hello,In the last commit, I only make the logger for warnings and did not change any logic. However, it still did not pass the checks.That is strange.I checked the logs, and it seems to be a timeout issue with Zookeeper. Could the success of the checks be related to network factors?

@walkinggo
Copy link
Contributor Author

@AlbumenJ I catch the exception,but i can't pass the CI/CD.I am trying to fix it.

@walkinggo
Copy link
Contributor Author

@AlbumenJ Take a look,please.

@AlbumenJ
Copy link
Member

Also, pls add some test cases

throw new Exception(child + "is not json");
}
} catch (Exception e) {
logger.warn(PROTOCOL_ERROR_DESERIALIZE, "", "", e.getMessage());
Copy link
Member

Choose a reason for hiding this comment

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

Enhance log content here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

should i output more information here?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, for some human friendly comment

@walkinggo
Copy link
Contributor Author

@AlbumenJ I had finish it,could you take a look please?

throw new Exception(child + "is not json");
}
} catch (Exception e) {
logger.warn(PROTOCOL_ERROR_DESERIALIZE, "", "", e.getMessage());
Copy link
Member

Choose a reason for hiding this comment

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

Yes, for some human friendly comment

Copy link

sonarcloud bot commented May 20, 2024

@AlbumenJ AlbumenJ merged commit 189d76b into apache:3.2 May 21, 2024
19 checks passed
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.

None yet

3 participants