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

Tsuyoshi OZAWA commented on YARN-1869:
--------------------------------------

Thank you for contributing, Blue. IMO, we should hold more small lock from 
performance's point of view.

{code}
      } else {
        synchronized(zkAcl) {
          opList.add(Op.create(nodeCreatePath, tokenOs.toByteArray(), zkAcl,
              CreateMode.PERSISTENT));
        }
      }
{code}

This can be done because zkAcl is initialized in initInternal() and is not 
updated after that.

{code}
  @Override
  public synchronized void initInternal(Configuration conf) throws Exception {
    ...
    zkAcl = RMZKUtils.getZKAcls(conf);
    ...
  }
{code}


> Access to zkAcl should be synchronized in ZKRMStateStore#addStoreOrUpdateOps()
> ------------------------------------------------------------------------------
>
>                 Key: YARN-1869
>                 URL: https://issues.apache.org/jira/browse/YARN-1869
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Minor
>         Attachments: yarn-1869.patch
>
>
> Here is related code:
> {code}
>       } else {
>         opList.add(Op.create(nodeCreatePath, tokenOs.toByteArray(), zkAcl,
>             CreateMode.PERSISTENT));
>       }
> {code}
> The other methods accessing zkAcl are synchronized.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to