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

[SBN Read] Race condition in ObserverReadProxyProvider

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate 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

        Issue Links

        Activity

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

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment