Skip to content

PHOENIX-8100 BasePermissionsIT read permission tests grant schema READ and WRITE to the table creator - #2732

Open
apurtell wants to merge 1 commit into
apache:masterfrom
apurtell:PHOENIX-8100
Open

apurtell wants to merge 1 commit into
apache:masterfrom
apurtell:PHOENIX-8100

Conversation

@apurtell

@apurtell apurtell commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

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

…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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 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

@apurtell

apurtell commented Dec 4, 2026

Copy link
Copy Markdown
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)

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.

2 participants