[ https://issues.apache.org/jira/browse/RANGER-2713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17045383#comment-17045383 ]
Pradeep Agrawal commented on RANGER-2713: ----------------------------------------- [~andrewluo] Have reopened this as its causing in upgrade case -> delete user rest call. {code:java} 2020-02-26 07:43:32,350 [http-bio-6080-exec-18] ERROR org.apache.catalina.core.StandardWrapperValve (StandardWrapperValve.java:266) - Servlet.service() for servlet [REST Service] in context with path [] threw exception javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'added_by_id' in 'where clause' Error Code: 1054 Call: update x_policy_ref_condition set added_by_id=null where added_by_id=61 Query: DataModifyQuery(sql="update x_policy_ref_condition set added_by_id=null where added_by_id=61") at org.eclipse.persistence.internal.jpa.QueryImpl.executeUpdate(QueryImpl.java:308) at org.apache.ranger.common.db.BaseDao.updateUserIDReference(BaseDao.java:303) at org.apache.ranger.service.XPortalUserService.updateXXPortalUserReferences(XPortalUserService.java:291) at org.apache.ranger.biz.XUserMgr.deleteXUser(XUserMgr.java:2265) at org.apache.ranger.biz.XUserMgr$$FastClassBySpringCGLIB$$57c6d473.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:667) ... {code} > Remove audit fields from XXPolicyRef objects > -------------------------------------------- > > Key: RANGER-2713 > URL: https://issues.apache.org/jira/browse/RANGER-2713 > Project: Ranger > Issue Type: Improvement > Components: admin, audit > Affects Versions: master > Reporter: Andrew Luo > Priority: Minor > Attachments: > 0001-RANGER-2713-Remove-audit-fields-from-XXPolicyRef-obj.patch > > > XXPolicyRef objects have fields such as create time, update time, added by > user ID, updated by user ID, but there fields are entirely useless since they > are all copied from the XXPolicy object. In addition, while improving > performance for creation of policies with large numbers of users, we > discovered that a lot of time was being spent in JPA converting these Date > objects especially. After removing these fields we saw a significant > performance improvement (a secondary benefit is less database space usage). -- This message was sent by Atlassian Jira (v8.3.4#803005)