Abhay Kulkarni created RANGER-3419:
--------------------------------------
Summary: 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
*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.3.4#803005)