Skip to content

RANGER-5678: Concurrent policy-engine rebuild on shared serviceDef ca…#1068

Open
Sanket-Shelar wants to merge 1 commit into
apache:masterfrom
Sanket-Shelar:RANGER-5678
Open

RANGER-5678: Concurrent policy-engine rebuild on shared serviceDef ca…#1068
Sanket-Shelar wants to merge 1 commit into
apache:masterfrom
Sanket-Shelar:RANGER-5678

Conversation

@Sanket-Shelar

Copy link
Copy Markdown
Contributor

…uses CME/NPE for delegated-admin User

What changes were proposed in this pull request?

Fixes concurrent policy-engine rebuilds mutating the shared cached RangerServiceDef during ServiceDefUtil.normalize(), which caused CME/NPE and getPolicyAdmin failures.

Changes: Added ServiceDefUtil.copyServiceDef() (JSON deep copy) and updated RangerPolicyRepository to normalize a private copy of serviceDef instead of the cache object. Added a unit test to ensure the source is not mutated.

How was this patch tested?

Local build passed

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.

1 participant