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

Add the necessary write lock in Checkpointer#doCheckpoint()

    XMLWordPrintableJSON

Details

    Description

      When BackupNode is enabled, Checkpointer#doCheckpoint() will start to work.
      When the image file needs to be reloaded, there is a call link, for example:
      FSImage#reloadFromImageFile()>FSNamesystem#clear()>FSDirectory#reset().
      In FSDirectory#reset(), the write lock needs to be acquired in advance, for example:
      void reset() {
      writeLock();
      try

      { ...... }

      finally

      { writeUnlock(); }

      }
      However, no write lock has been acquired before this.
      You will get an exception message at this time, for example:
      java.lang.AssertionError: Should hold namesystem write lock

      Attachments

        Issue Links

          Activity

            People

              jianghuazhu JiangHua Zhu
              jianghuazhu JiangHua Zhu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 40m
                  2h 40m