Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-14279

[SBN Read] Race condition in ObserverReadProxyProvider

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.0
    • Component/s: hdfs, namenode
    • Labels:
      None
    • Target Version/s:

      Description

      There is a race condition in ObserverReadProxyProvider#getCurrentProxy():

        private NNProxyInfo<T> getCurrentProxy() {
          if (currentProxy == null) {
            changeProxy(null);
          }
          return currentProxy;
        }
      

      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.

        Attachments

        1. HDFS-14279.000.patch
          2 kB
          Erik Krogen
        2. HDFS-14279.001.patch
          3 kB
          Erik Krogen

          Issue Links

            Activity

              People

              • Assignee:
                xkrogen Erik Krogen
                Reporter:
                xkrogen Erik Krogen
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: