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

Garbage collect map entries in shared RouterStateIdContext using information from namenodeResolver instead of the map of active connectionPools.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 3.4.0
    • 3.4.0
    • rbf
    • Reviewed

    Description

      An element in RouterStateIdContext#namespaceIdMap is deleted when there is no connectionPool referencing the namespace. This is done by a thread in ConnectionManager that cleans up stale connectionPools. I propose a less aggressive approach, that is, cleaning up an entry when the router cannot resolve a namenode belonging to the namespace.

      Some benefits of this approach are:

      • Even when there are no active connections, the router still tracks a recent state of the namenode. This will be beneficial for debugging.
      • Simpler lifecycle for the map entries. The entries are long-lived.
      • Few operations under the writeLock in ConnectionManager.

      Attachments

        Issue Links

          Activity

            People

              simbadzina Simbarashe Dzinamarira
              simbadzina Simbarashe Dzinamarira
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: