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

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.3.0
    • hdfs, namenode
    • None

    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment