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

Hudson commented on HDFS-14279:
-------------------------------

SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #16033 (See 
[https://builds.apache.org/job/Hadoop-trunk-Commit/16033/])
HDFS-14279. [SBN read] Fix race condition in ObserverReadProxyProvider. 
(xkrogen: rev bad3ffd2907d75395907ff6b76c909ab50add4bc)
* (edit) 
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ObserverReadProxyProvider.java


> [SBN Read] Race condition in ObserverReadProxyProvider
> ------------------------------------------------------
>
>                 Key: HDFS-14279
>                 URL: https://issues.apache.org/jira/browse/HDFS-14279
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs, namenode
>            Reporter: Erik Krogen
>            Assignee: Erik Krogen
>            Priority: Major
>             Fix For: 3.3.0
>
>         Attachments: HDFS-14279.000.patch, HDFS-14279.001.patch
>
>
> There is a race condition in {{ObserverReadProxyProvider#getCurrentProxy()}}:
> {code}
>   private NNProxyInfo<T> getCurrentProxy() {
>     if (currentProxy == null) {
>       changeProxy(null);
>     }
>     return currentProxy;
>   }
> {code}
> {{currentProxy}} is a {{volatile}}. Another {{changeProxy()}} could occur 
> after the {{changeProxy()}} and before the {{return}}, thus making the return 
> value incorrect. I have seen this result in an NPE.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to