You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "vyommani (via GitHub)" <gi...@apache.org> on 2025/05/08 06:29:46 UTC
[PR] RANGER-5210: private variable isPolicyEngineShared is set to wrong value [ranger]
vyommani opened a new pull request, #571:
URL: https://github.com/apache/ranger/pull/571
## What changes were proposed in this pull request?
In the RangerBasePlugin class, the isPolicyEngineShared variable is incorrectly set to true even when the policy engine instance isn't shared.
When delta sync is enabled, the PolicyRefresher downloads modified policies and updates the policy engine. If locking is enabled, it updates the existing policy engine instance; otherwise, it creates a new instance.
The setPolicies method creates a new policy engine instance by calling RangerPolicyEngineImpl.getPolicyEngine. However, this method might return the same instance, not a new one.
The isPolicyEngineShared flag is set to true if newPolicyEngine isn't null, which is incorrect. Instead, it should be set to true only if newPolicyEngine is the same instance as the old policy engine.
## How was this patch tested?
I tested locally as follows
mvn clean install
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@ranger.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] RANGER-5210: private variable isPolicyEngineShared is set to wrong value [ranger]
Posted by "vyommani (via GitHub)" <gi...@apache.org>.
vyommani closed pull request #571: RANGER-5210: private variable isPolicyEngineShared is set to wrong value
URL: https://github.com/apache/ranger/pull/571
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@ranger.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org