----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/72696/#review221288 -----------------------------------------------------------
security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java Lines 2320 (patched) <https://reviews.apache.org/r/72696/#comment310169> What is the serviceName in rangerPolicy? Wouldn't it be same as the source-serviceName? If yes, how does #2325 avoid deleting the policies (that match the resource) in the source-service? I suggest to send servicesMappingMap as an argument to deleteExactMatchPolicyForResource() (like #2328), and update deleteExactMatchPolicyForResource() to look for matching policies in the target-service name i.e. ignore the service-name given in policies. - Madhan Neethiraj On July 21, 2020, 1:28 p.m., Dineshkumar Yadav wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/72696/ > ----------------------------------------------------------- > > (Updated July 21, 2020, 1:28 p.m.) > > > Review request for ranger, Ankita Sinha, Gautam Borad, Kishor Gollapalliwar, > Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, and > Velmurugan Periasamy. > > > Repository: ranger > > > Description > ------- > > source policy is getting deleted while importing policy with deleteifexists > parameter > > > Diffs > ----- > > security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java > c795525f2 > > > Diff: https://reviews.apache.org/r/72696/diff/1/ > > > Testing > ------- > > Steps to Reproduce: > 1. Create 2 Hbase service i.e. hbase1 and hbase2, > 2. Create some policies in service - hbase1 > 3. perform policy import from source service - hbase1 to target service - > hbase2 > 4. Policies from service - hbase1 gets successfully imported to service - > hbase2 as per deleteifexist parameter feature > 5. After import, Policies from source service - hbase1 also gets deleted > > After patch source service is not getting deleted. > > > Thanks, > > Dineshkumar Yadav > >