Skip to content

PHOENIX-8118 BasePermissionsIT should wait for the master and custom AccessController ACL caches - #2750

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

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

Conversation

@apurtell

@apurtell apurtell commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

The permission test for super users fails in CI because a deny check right after a revoke passes. It fails mostly in the classes with a custom access controller. This issue replaces PHOENIX-6597, which is closed as a duplicate.

The helper that waits for ACL changes has two faults. It finds access controllers only by exact class name, so it finds none when the cluster loads a subclass. The wait then ends at once. It also checks only the region servers, but the master checks grants and revokes against its own cache. ZooKeeper refreshes that cache asynchronously. This change is test-only. The helper now finds subclasses and also waits for the master. The deny checks do not change.

🤖 Generated with Claude Code

…AccessController ACL caches

updateACLs waits until the AuthManager of each AccessController sees the
ACL change. The helper found controllers by exact class name, so it found
none when the cluster loads a subclass of AccessController. It also
scanned only the region servers and skipped the master. The master checks
GRANT and REVOKE requests against its own cache, which ZooKeeper refreshes
asynchronously. A deny check right after REVOKE could thus pass on a stale
master cache and the test failed with "Expected exception was not thrown".

Look up controllers by class type, so that subclasses match, and include
the master controller in the wait. The deny checks are unchanged.

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 ACL cache synchronization changes.

No open issues 🎉

What changed in this PR

Addresses permission-test flakiness by making BasePermissionsIT wait for ACL cache updates on the master and custom access controllers. Changes are test-only; deny checks remain unchanged.

Changes:

  • Include the master’s access controller in cache-update waits.
  • Use class-based lookup to discover AccessController subclasses.
  • Handle controllers without a region in diagnostic logging.
File Description
phoenix-core/​src/​it/​java/​org/​apache/​phoenix/​end2end/​BasePermissionsIT.java Extends ACL cache synchronization to master and custom controllers, with region-safe logging.

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