> On Aug. 14, 2022, 12:38 p.m., Abhay Kulkarni wrote:
> > security-admin/src/main/java/org/apache/ranger/patch/PatchForSolrSvcDefAndPoliciesUpdate_J10055.java
> > Lines 141 (patched)
> > <https://reviews.apache.org/r/74087/diff/1/?file=2269633#file2269633line141>
> >
> >     If updateSolrSvcDef() updates just one service-definition, does it 
> > really touch a lot of objects thereby causing a large transaction? If not, 
> > please review if this change is needed.

1) This does not touch a lot of objects and a small transaction. but i need to 
make this change here because without the commit of this transaction new 
service def is not available to further calls (i.e 
updateExistingRangerResPolicy() or updateExistingRangerTagPolicies()).
2) Without the new service-def availability new resource-types and access-types 
will not be available as a reference to each ranger solr policy which they 
should refer after the upgrade.
3) without this change when policies are getting updated then i am getting 
error "invalid resource-type "admin". Its because both are executing in a 
different transaction.


- Pradeep


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74087/#review224624
-----------------------------------------------------------


On Aug. 13, 2022, 9:27 p.m., Pradeep Agrawal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74087/
> -----------------------------------------------------------
> 
> (Updated Aug. 13, 2022, 9:27 p.m.)
> 
> 
> Review request for ranger, bhavik patel, Dhaval Shah, Abhay Kulkarni, Madhan 
> Neethiraj, Mehul Parikh, Ramesh Mani, Sailaja Polavarapu, and Velmurugan 
> Periasamy.
> 
> 
> Bugs: RANGER-3857
>     https://issues.apache.org/jira/browse/RANGER-3857
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> It was observed during ranger upgrades that the java patch J10055 taking 
> several hours while trying to update the Solr service def to the db. 
> This happens only when a solr service is having lot of policies.
> Therefore, persisting the updates immediately using transaction manager to 
> boost performance.
> 
> 
> Diffs
> -----
> 
>   
> security-admin/src/main/java/org/apache/ranger/patch/PatchForSolrSvcDefAndPoliciesUpdate_J10055.java
>  4684923ca 
> 
> 
> Diff: https://reviews.apache.org/r/74087/diff/1/
> 
> 
> Testing
> -------
> 
> Installed ranger 2.2 and created 3k Ranger policies for solr service.
> Build Ranger master with this patch and untar it then provided same db config 
> used for previous install.
> call the setup script. 
> without the patch it was taking 3 hours, after the patch its taking 3 minutes 
> only.
> 
> 
> Thanks,
> 
> Pradeep Agrawal
> 
>

Reply via email to