HBase
  1. HBase
  2. HBASE-2925

LRU of HConnectionManager.HBASE_INSTANCES breaks if HBaseConfiguration is changed

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.20.3, 0.90.0
    • Fix Version/s: 0.90.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Tags:
      noob

      Description

      HConnectionManager.getConnection(config) caches the created TableServer in HBASE_INSTANCES (a LinkedHashMap ) which is keyed by the configuration instance itself.
      Given the current implementation of hashCode() (and equals()) of HBaseConfiguration, the hash code of the configuration is changed if any of its properties are changed, which will cause the keys of HBASE_INSTANCES to be inconsistent with the hashtable that contains them, making some entries unreachable.
      In this case, when the map's LRU strategy needs to remove the oldest entry, it tries to remove it based on the oldest key, which no longer gives the original hash code, therefore the lookup in HBASE_INSTANCES.remove(oldest) doesn't actually remove anything.

      This has been observed to lead to OOM errors in long running clients.

      1. 2925.txt
        17 kB
        stack
      2. 2925-v2.txt
        20 kB
        stack
      3. SimpleHConnectionManagerLeakReplicator.java
        3 kB
        Robert Mahfoud

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Robert Mahfoud
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development