Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-11149

Expose information about cleaned up leftover ThreadLocal values

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • Commons Threads 3.3.2
    • Commons
    • None

    Description

      As discussed in SLING-10831, the ThreadLocal cleanup feature is valuable as a safeguard for code that might lead to hard-to-diagnose memory leaks.

      At the same time, it does not let developers know when a leak has been prevented. We should improve this. The following improvements can be made:

      1. log with a WARN level any cleanup operation. Care must be taken to not overflow the logs, so maybe a way of only reporting a cleanup for a certain key once can be used (memory-bound)
      2. expose a counter that reports how many cleanup operations have been performed by a given thread pool

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rombert Robert Munteanu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m