Vyom Mani Tiwari created RANGER-5210:
----------------------------------------

             Summary: private variable isPolicyEngineShared is set to wrong 
value
                 Key: RANGER-5210
                 URL: https://issues.apache.org/jira/browse/RANGER-5210
             Project: Ranger
          Issue Type: Bug
          Components: Ranger
            Reporter: Vyom Mani Tiwari
            Assignee: Vyom Mani Tiwari


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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to