-
Notifications
You must be signed in to change notification settings - Fork 7.2k
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
ZOOKEEPER-4377: KeeperException.create has NullPointerException when low version client requests the high version server #1764
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
maoling
commented
Sep 25, 2021
- When low version client accessed the high version server which has some new added error code, the client will get a NPE:
- How to reproduce this issue?For example:
- Apply this patch, we will get the following:
- we should backport this PR to all branches, making the client has upward compatibility
- more details in the ZOOKEEPER-4377
…low version client requests the high version server
ruanwenjun
approved these changes
Oct 5, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
eolivelli
approved these changes
Oct 5, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
I agree that we have to port this to 3.6
, 3.7 and possibly 3.5
asfgit
pushed a commit
that referenced
this pull request
Oct 17, 2021
…low version client requests the high version server - When low version client accessed the high version server which has some new added error code, the client will get a NPE: ``` java.lang.NullPointerException at org.apache.zookeeper.KeeperException.create(KeeperException.java:94) at org.apache.zookeeper.KeeperException.create(KeeperException.java:54) at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:1538) ``` - How to reproduce this issue?For example: ``` the client version we using is 3.6.0, and server version we using is 3.7.0 which has a new added error code QUOTAEXCEEDED(-125), we set quota at server side and use the client to create znodes which exceeds the quota, the client will get a NPE ``` - Apply this patch, we will get the following: ``` java.lang.IllegalArgumentException: The current client version cannot lookup this code:-125 at org.apache.zookeeper.KeeperException$Code.get(KeeperException.java:449) at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:1347) ``` - we should backport this PR to all branches, making the client has upward compatibility - more details in the [ZOOKEEPER-4377](https://issues.apache.org/jira/browse/ZOOKEEPER-4377) Author: maoling <maoling@apache.org> Reviewers: Enrico Olivelli <eolivelli@apache.org>, ruanwenjun <wenjun@apache.org> Closes #1764 from maoling/ZOOKEEPER-4377 (cherry picked from commit 9f355f5) Signed-off-by: maoling <maoling@apache.org>
Commit to the following branches: |
This was referenced Jan 28, 2022
3 tasks
asfgit
pushed a commit
that referenced
this pull request
May 17, 2022
…low version client requests the high version server - When low version client accessed the high version server which has some new added error code, the client will get a NPE: ``` java.lang.NullPointerException at org.apache.zookeeper.KeeperException.create(KeeperException.java:94) at org.apache.zookeeper.KeeperException.create(KeeperException.java:54) at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:1538) ``` - How to reproduce this issue?For example: ``` the client version we using is 3.6.0, and server version we using is 3.7.0 which has a new added error code QUOTAEXCEEDED(-125), we set quota at server side and use the client to create znodes which exceeds the quota, the client will get a NPE ``` - Apply this patch, we will get the following: ``` java.lang.IllegalArgumentException: The current client version cannot lookup this code:-125 at org.apache.zookeeper.KeeperException$Code.get(KeeperException.java:449) at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:1347) ``` - we should backport this PR to all branches, making the client has upward compatibility - more details in the [ZOOKEEPER-4377](https://issues.apache.org/jira/browse/ZOOKEEPER-4377) Author: maoling <maoling@apache.org> Reviewers: Enrico Olivelli <eolivelli@apache.org>, ruanwenjun <wenjun@apache.org> Closes #1764 from maoling/ZOOKEEPER-4377 (cherry picked from commit 9f355f5) Signed-off-by: maoling <maoling@apache.org> (cherry picked from commit 86c1263)
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.