Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-1623 High Availability Framework for HDFS NN
  3. HDFS-2626

HA: BPOfferService.verifyAndSetNamespaceInfo needs to be synchronized

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • HA branch (HDFS-1623)
    • datanode, ha
    • None

    Description

      When starting an HA blockpool with both namenodes up, I often see an NPE, referenced by one of the TODOs. The issue is the following interleaving:

      • first BPActor registers, and sets bpNSInfo in BPOfferService. It then proceeds to initFsDataset which takes a little bit of time
      • second BPActor registers, and sees bpNSInfo is non-null, then proceeds to heartbeat loop. Meanwhile BPActor 1 is still initting FSDataset
      • second BPActor gets an NPE on first heartbeat since fsdataset is still null.
        We just need to synchronize that function to fix the NPE.

      Attachments

        1. hdfs-2626.txt
          2 kB
          Todd Lipcon

        Activity

          People

            tlipcon Todd Lipcon
            tlipcon Todd Lipcon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: