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

Improper synchronization in some FSNamesystem methods

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 0.21.0, 0.22.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      There are some methods in FSNamesystem that check isInSafeMode while not synchronized, and then proceed to perform operations. Thus the actual operations can occur after the NN has entered safemode, which is no good.

        Issue Links

          Activity

          Hide
          tlipcon Todd Lipcon added a comment -

          HDFS-988 will cover these as well.

          Show
          tlipcon Todd Lipcon added a comment - HDFS-988 will cover these as well.
          Hide
          tlipcon Todd Lipcon added a comment -

          Quick search through FSNamesystem shows:

          • concat checks safemode before entering synchronization block
          • setQuota isn't synchronized at all (it calls dir.setQuota with no synchronization either)
          • renewLease isn't synchronized (not certain for sure if this has to be - it seems like it ought to be so that the leases serialized in an fsimage are consistent)
          • computeDatanodeWork - this one is a bit tricky as well. Is blockManager.updateState() safe to call in safeMode?
          Show
          tlipcon Todd Lipcon added a comment - Quick search through FSNamesystem shows: concat checks safemode before entering synchronization block setQuota isn't synchronized at all (it calls dir.setQuota with no synchronization either) renewLease isn't synchronized (not certain for sure if this has to be - it seems like it ought to be so that the leases serialized in an fsimage are consistent) computeDatanodeWork - this one is a bit tricky as well. Is blockManager.updateState() safe to call in safeMode?

            People

            • Assignee:
              Unassigned
              Reporter:
              tlipcon Todd Lipcon
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development