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

HeartbeatManager#Monitor may wrongly hold the writelock of namesystem

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0-alpha1
    • 0.23.4, 2.0.2-alpha
    • None
    • None
    • Reviewed

    Description

      In HeartbeatManager#heartbeatCheck, if some dead datanode is found, the monitor thread will acquire the write lock of namesystem, and recheck the safemode. If it is in safemode, the monitor thread will return from the heartbeatCheck function without release the write lock. This may cause the monitor thread wrongly holding the write lock forever.

      The attached test case tries to simulate this bad scenario.

      Attachments

        1. HDFS-3860.patch
          0.9 kB
          Jing Zhao
        2. HDFS-heartbeat-testcase.patch
          5 kB
          Jing Zhao

        Activity

          People

            jingzhao Jing Zhao
            jingzhao Jing Zhao
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: