Repository navigation
Conversation
…D and WRITE to the table creator The table creator has only CREATE on the schema. READ and WRITE on a new table come from the HBase owner grant. The owner grant reaches the region servers asynchronously through ZooKeeper. The CREATE TABLE scan and the UPSERTs that follow can run before it arrives. The two read permission tests now grant READ, WRITE and CREATE on the schema. The creator does not get ADMIN, so grant and revoke still use the owner grant. The tests for the second user do not change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the test-only update that makes schema permissions explicit to avoid asynchronous owner-grant timing.
No open issues 🎉
What changed in this PR
This test-only change addresses intermittent access denials in Phoenix’s read-permission integration tests caused by asynchronous table-owner grants.
Changes:
- Grant READ, WRITE, and CREATE to the table creator in both read-permission tests, with and without namespace mapping.
- Add comments explaining why explicit schema permissions avoid relying on the owner grant.
| File | Description |
|---|---|
| phoenix-core/src/it/java/org/apache/phoenix/end2end/BasePermissionsIT.java | Expand schema grants in both tests and document the timing rationale. |
Review effort: Balanced
Contributor
Author
|
Precommit note: the failures in this run are not related to this change. Each one is a known problem on master.
(Claude Code) |
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.
The read permission tests fail intermittently. The table creator gets a READ access denial on its own new table, from the scan inside its CREATE TABLE. The test grants the creator only CREATE on the schema. READ and WRITE on the new table come from the HBase owner grant, which region servers get asynchronously. Phoenix can scan the new table, and the test can run upserts, before that grant arrives.
The change is test-only. The two read permission tests now grant READ, WRITE and CREATE on the schema. The grant helper waits for this explicit grant, so the scan and the upserts no longer need the owner grant. The creator still does not get ADMIN. In the classes with a custom access controller, this wait works only with PHOENIX-8118.
🤖 Generated with Claude Code