Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-3584

Expose metrics for ConnectionQueryServices instances and their allocators in the JVM

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.9.1, 4.10.0
    • None
    • None

    Description

      In the case a client is leaking Phoenix/HBase connections it would be helpful to have metrics available on the number of ConnectionQueryServices (ConnectionQueryServicesImpl) instances and who has allocated them.

      For the latter, we could get a stacktrace when ConnectionQueryServicesImpls are allocated (should be a relatively rare) and keep a count by hash of the call stack (and save the call stack). Then we need a method to dump the hash to callstack map as a string. This method can be called remotely by JMX when debugging leaks in a live environment. Perhaps after the count of ConnectionQueryServicesImpls goes over a configurable threshold we can also log warnings that dump the counts by hash and callstacks corresponding to those hashes.

      Or, we should only have multiple ConnectionQueryServicesImpls if an optional parameter is passed in the JDBC connect string. We could keep counts by that parameter string and dump that instead of call stacks.

      Attachments

        1. PHOENIX-3584.patch
          17 kB
          Samarth Jain

        Activity

          People

            samarthjain Samarth Jain
            apurtell Andrew Kyle Purtell
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: