[ 
https://issues.apache.org/jira/browse/HDFS-14279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Erik Krogen updated HDFS-14279:
-------------------------------
       Resolution: Fixed
    Fix Version/s: 3.3.0
           Status: Resolved  (was: Patch Available)

> [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: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to