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

[SBN Read] Race condition in ObserverReadProxyProvider

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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.001.patch
          3 kB
          Erik Krogen
        2. HDFS-14279.000.patch
          2 kB
          Erik Krogen

        Issue Links

          Activity

            People

            • Assignee:
              xkrogen Erik Krogen
              Reporter:
              xkrogen Erik Krogen

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment