[
https://issues.apache.org/jira/browse/RANGER-3419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ramesh Mani updated RANGER-3419:
--------------------------------
Fix Version/s: 3.0.0
2.2.0
> compressDeltas method returns two ranger policy entries for policy
> create+update case when provided lastKnownVersion is previous to create call
> -----------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: RANGER-3419
> URL: https://issues.apache.org/jira/browse/RANGER-3419
> Project: Ranger
> Issue Type: Bug
> Components: Ranger
> Reporter: Abhay Kulkarni
> Assignee: Abhay Kulkarni
> Priority: Major
> Fix For: 3.0.0, 2.2.0
>
>
> *Problem Statement:* compressDeltas method returns two ranger policy entries
> for policy create+update case when provided lastKnownVersion is previous to
> create policy operation. As per the design it should return only one last
> updated entry for the policy even if multiple update policy request is made
> after the create policy request.
> Steps to reproduce:
> 1) call the policy download api and note the policy lastKnownVersion.
> 2) call create policy api
> 3) call update policy api for the policy created in step 2 above.
> 4) call the policy download api and provide the policy lastKnownVersion noted
> in step 1 above.
> *Proposed Solution:* At line 3013, we have already added the policy so in
> case of create+update operation first entry alone can be considered and all
> next update event can be skipped.
> since x_policy table stores only latest entry of a policy, during delta
> calculation for both the change type(create/update) same policy text is
> fetched, hence received policy snapshot is same and there is no point of
> having two entries.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)