Hadoop Common
  1. Hadoop Common
  2. HADOOP-4986

FSNamesystem.getBlockLocations sets access time without holding the namespace locks

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Invalid
    • Affects Version/s: 0.19.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      After the access time feature is added to HDFS, FSNamesystem.getBlockLocations(..) is no longer a read only namespace operation. It changes the namespace by updating the access time. However, the thread does not own namespace locks. This may lead to namespace inconsistency.

        Issue Links

          Activity

          Hide
          Tsz Wo Nicholas Sze added a comment -

          Because of this and HADOOP-4972, it may makes sense to acquire namesystem locks in getBlockLocationsInternal. However, it may leads to significant performance degradation

          Show
          Tsz Wo Nicholas Sze added a comment - Because of this and HADOOP-4972 , it may makes sense to acquire namesystem locks in getBlockLocationsInternal. However, it may leads to significant performance degradation
          Hide
          Tsz Wo Nicholas Sze added a comment -

          getBlockLocationsInternal is already synchronized. How come I have missed this?

          Show
          Tsz Wo Nicholas Sze added a comment - getBlockLocationsInternal is already synchronized. How come I have missed this?

            People

            • Assignee:
              Unassigned
              Reporter:
              Tsz Wo Nicholas Sze
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development