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

HAState#prepareToEnterState needn't a lock

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.2.0
    • 3.3.0
    • hdfs
    • None

    Description

      prepareToEnterState in HAState is called without the context being locked.

      But in NameNode#NameNode, prepareToEnterState is after haContext.writeLock()

       

      try {
        haContext.writeLock();
        state.prepareToEnterState(haContext);
        state.enterState(haContext);
      } finally {
        haContext.writeUnlock();
      }
      

       

      Is it OK?

       

      Attachments

        Issue Links

          Activity

            People

              hunhun hunshenshi
              hunhun hunshenshi
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: