Repository navigation
ZOOKEEPER-4219: Quota checks break setData in multi transactions (backport) - #167
Merged
arkmish merged 1 commit intoOct 19, 2026
Conversation
Backport of apache/zookeeper eb1569e (released in 3.7.0/3.8.0). checkQuota now receives the previous data from the prepared ChangeRecord instead of looking the node up in DataTree, which NPE'd for a create followed by setData in the same multi(). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 task
arkmish
merged commit Oct 19, 2026
1e2b5f7
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 2/3: mirrors upstream ZOOKEEPER-4219 (apache/zookeeper@eb1569e4f, released in 3.7.0 / 3.8.0). This PR is based on the ZOOKEEPER-3301 PR, so merge that first.
checkQuotaused to look up the node's existing data inDataTree. For amulti()that creates a node and then sets its data, the node exists only as a pendingChangeRecord, so that lookup threw an NPE. The fix passesnodeRecord.datafromPrepRequestProcessorintocheckQuota(path, lastData, data, type); create passesnull.Tests
ZooKeeperQuotaEnforcementTestcovers both cases:QuotaExceededExceptionand leaves no partial changes.Changes that Break Backward Compatibility (Optional)
The signature of the public
ZooKeeperServer.checkQuotamethod changes, as it did upstream.Documentation (Optional)
Updated the JIRA list in
zookeeperQuotas.md.Created with GitHub Copilot CLI.