Repository navigation
ZOOKEEPER-4377: KeeperException.create NPE for unknown error codes (backport) - #168
Merged
arkmish merged 1 commit intoOct 19, 2026
Conversation
…low version client requests the high version server Backport of apache/zookeeper 9f355f5 (released in 3.5.10/3.7.1/3.8.0). Code.get throws IllegalArgumentException for unknown codes and KeeperException.create reports the code, instead of an NPE. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 task
Base automatically changed from
armishra/zookeeper-4219-quota-multi-setdata
to
armishra/zookeeper-3301-quota-enforcement
October 19, 2026 14:53
arkmish
merged commit Oct 19, 2026
40002b6
into
armishra/zookeeper-3301-quota-enforcement
16 checks passed
1 task
Author
|
Folded into #166, which now carries all three backport commits. This PR shows as merged only because its commits became part of the stacked base branch; nothing was merged into |
This file contains hidden or 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
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.
Description
Stack 3/3: mirrors upstream ZOOKEEPER-4377 (apache/zookeeper@9f355f5a5, released in 3.5.10 / 3.7.1 / 3.8.0). This PR is based on the ZOOKEEPER-4219 PR.
Before this change, a client that received an error code it did not know (for example, a newer server's error) hit an NPE inside
KeeperException.create. NowCode.getthrowsIllegalArgumentException("The current client version cannot lookup this code:<code>"), and the default message includes the code. This matters for the-128code added in this stack.Tests
KeeperExceptionQuotaTest.testUnknownWireErrorIsExplicit.test-compileand Checkstyle passed.Changes that Break Backward Compatibility (Optional)
Code.getthrowsIllegalArgumentExceptionfor unknown codes instead of returningnull.Documentation (Optional)
Updated the JIRA list in
zookeeperQuotas.md.Created with GitHub Copilot CLI.