You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "xiaoli (JIRA)" <ji...@apache.org> on 2018/10/15 07:30:00 UTC

[jira] [Commented] (RANGER-2236) updatePolicy performance problem

    [ https://issues.apache.org/jira/browse/RANGER-2236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16649841#comment-16649841 ] 

xiaoli commented on RANGER-2236:
--------------------------------

link to https://issues.apache.org/jira/browse/RANGER-2158

> updatePolicy performance problem
> --------------------------------
>
>                 Key: RANGER-2236
>                 URL: https://issues.apache.org/jira/browse/RANGER-2236
>             Project: Ranger
>          Issue Type: Improvement
>          Components: admin
>    Affects Versions: 0.7.0
>            Reporter: xiaoli
>            Priority: Major
>
> when a hdfs policy has many users,CreateNewPolicyItemsForPolicy and deleteExistingPolicyItems possible performance issues
> List<XXPolicyItemUserPerm> users = userPermDao.findByPolicyItemId(polItemId);
>  for(XXPolicyItemUserPerm user : users) {
>  userPermDao.remove(user);
>  }
> public boolean remove(T obj) {
>  if (obj == null) {
>  return true;
>  }
> em.remove(obj);
>  em.flush();
> return true;
>  }
> ---------------------------
> Causes the updatePolicy method to return execution results slowly



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)