[
https://issues.apache.org/jira/browse/YARN-5921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15723985#comment-15723985
]
Hudson commented on YARN-5921:
------------------------------
SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10942 (See
[https://builds.apache.org/job/Hadoop-trunk-Commit/10942/])
YARN-5921. Incorrect synchronization in (naganarasimha_gr: rev
f3b8ff54ab08545d7093bf8861b44ec9912e8dc3)
* (edit)
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMContextImpl.java
> Incorrect synchronization in RMContextImpl#setHAServiceState/getHAServiceState
> ------------------------------------------------------------------------------
>
> Key: YARN-5921
> URL: https://issues.apache.org/jira/browse/YARN-5921
> Project: Hadoop YARN
> Issue Type: Bug
> Reporter: Varun Saxena
> Assignee: Varun Saxena
> Attachments: YARN-5921.01.patch, YARN-5921.02.patch
>
>
> Code in RMContextImpl is as under:
> {code:title=RMContextImpl.java|borderStyle=solid}
> void setHAServiceState(HAServiceState haServiceState) {
> synchronized (haServiceState) {
> this.haServiceState = haServiceState;
> }
> }
> public HAServiceState getHAServiceState() {
> synchronized (haServiceState) {
> return haServiceState;
> }
> }
> {code}
> As can be seen above, in setHAServiceState, we are synchronizing on the
> passed haServiceState instead of haServiceState in RMContextImpl which will
> not lead to desired effect. This does not seem to be intentional.
> We can use a RW lock or synchronize on some object here.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]