[
https://issues.apache.org/jira/browse/RANGER-2369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17120744#comment-17120744
]
Haihui Xu commented on RANGER-2369:
-----------------------------------
This may be mysql config error.
> Cannot multi-thread process hive grant sql when installed ranger-hive-plugin
> ----------------------------------------------------------------------------
>
> Key: RANGER-2369
> URL: https://issues.apache.org/jira/browse/RANGER-2369
> Project: Ranger
> Issue Type: Bug
> Components: admin, Ranger
> Affects Versions: 0.5.3, 1.1.0
> Reporter: Haihui Xu
> Assignee: Gautam Borad
> Priority: Major
> Fix For: 1.2.1
>
>
> 1、enable ranger-hive-plugin successfully;
> 2、Multi-thread process “ grant select on table tableName to user userName“;
> 3、the rangeradmin (0.5.3)log errors are:
> 2019-03-12 16:20:28,157 [http-bio-6080-exec-3] ERROR
> org.apache.ranger.rest.ServiceREST (ServiceREST.java:951) -
> grantAccess(NMG1_hive, GrantRevokeRequest={grantor=
> {hive}
> resource=\{column=*; table=bbzhenhao1; database=default; } users=\{hxatest }
> groups={} accessTypes=\{select } delegateAdmin=\{false} enableAudit=\{true}
> replaceExistingPermissions=\{false} isRecursive=\{false}
> clientIPAddress=\{10.129.3.1} clientType=\{HIVESERVER2} requestData={}
> sessionId=\{59259b8c-223c-45f5-95cd-a30671de4d79} }) failed
> 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.MySQLTransactionRollbackException: Deadlock
> found when trying to get lock; try restarting transaction
> Error Code: 1213
> Call: UPDATE x_service SET policy_update_time = ?, policy_version = ?,
> UPDATE_TIME = ?, version = ? WHERE ((id = ?) AND (version = ?))
> bind => [6 parameters bound]
> Query: UpdateObjectQuery(XXService [id=2])
> at
> org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:868)
> at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:240)
> at com.sun.proxy.$Proxy20.flush(Unknown Source)
> at org.apache.ranger.common.db.BaseDao.update(BaseDao.java:99)
> at
> org.apache.ranger.biz.ServiceDBStore.updatePolicyVersion(ServiceDBStore.java:1896)
> at
> org.apache.ranger.biz.ServiceDBStore.handlePolicyUpdate(ServiceDBStore.java:1864)
> at
> org.apache.ranger.biz.ServiceDBStore.createPolicy(ServiceDBStore.java:1384)
> at org.apache.ranger.rest.ServiceREST.grantAccess(ServiceREST.java:946)
> at
> org.apache.ranger.rest.ServiceREST$$FastClassByCGLIB$$92dab672.invoke(<generated>)
> at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
> at
> org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
> at
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
> at
> org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622)
> at
> org.apache.ranger.rest.ServiceREST$$EnhancerByCGLIB$$d842e7d5.grantAccess(<generated>)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)