----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/73790/#review223939 -----------------------------------------------------------
security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java Line 2574 (original), 2577 (patched) <https://reviews.apache.org/r/73790/#comment312982> Should this condition be as follows? Please review. if (xXPortalUser != null && xxUser == null) { - Abhay Kulkarni On Jan. 6, 2022, 6:08 p.m., Pradeep Agrawal wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/73790/ > ----------------------------------------------------------- > > (Updated Jan. 6, 2022, 6:08 p.m.) > > > Review request for ranger, Dineshkumar Yadav, Kishor Gollapalliwar, Abhay > Kulkarni, Madhan Neethiraj, Mehul Parikh, Ramesh Mani, Sailaja Polavarapu, > and Velmurugan Periasamy. > > > Bugs: RANGER-3576 > https://issues.apache.org/jira/browse/RANGER-3576 > > > Repository: ranger > > > Description > ------- > > **Problem Statement:** Sometime parallel service creation request may fail > due to DB unique key constraint on x_user table as first request to create a > user may succeed for the same user while other requests might fail to create > it as they dont have information about user creation event by another > request. > It seems issue has been handled for x_portal_user table because the user > creation process happens through a separate transaction mechanism, while its > failing for x_user request as that is not done in a separate transaction. > When x_user creation request fails from db end then the issue is not handled > by jpa/eclipselink/spring and it seems overall transaction is > aborted/roledback, which causes the failure of service creation. > > **Proposed solution:** x_user table user's creation request also can be done > via a separate transaction mechanism and overall process can be guarded and > retried if the request fails. > > > Diffs > ----- > > security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java 0eb582c8e > > > Diff: https://reviews.apache.org/r/73790/diff/1/ > > > Testing > ------- > > Pending. > > Note: Its difficult to reproduce the issue as its intermittent, so unable to > figure out that the approach is resolving the issue or not. will retry the > patch and update the details here. > > > Thanks, > > Pradeep Agrawal > >
