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

getContentSummary should hold the FSNamesystem readlock

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • None
    • None
    • None
    • None

    Description

      Right now the getContentSummary call on the namenode only holds the FSDirectory lock, but not the FSNamesystem lock. What we are seeing because of that is:
      1) getContentSummary takes the read lock on FSDirectory
      2) the write operation comes and takes a write lock on FSNamesystem and waits for getContentSummary to finish to get a write lock on FSDirectory

      As a result other read operations can't be executed. Since getContentSummary can take a while to execute on large directories, the performance would be improved if we hold a readlock while doing that.

      Attachments

        Issue Links

          Activity

            People

              dms Dmytro Molkov
              dms Dmytro Molkov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: