Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-2766

HdrHeap::coalesce_str_heaps doesn't properly calculate new heap size

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.2.1, 5.0.0
    • 4.2.2, 5.0.0
    • Core
    • None

    Description

      HdrHeap::coalesce_str_heaps doesn't properly calculate the new heap size for a few reasons:

      1) It doesn't current walk the HdrHeap chain (m_next).
      2) It doesn't account for HdrHeap objects that point to the same string in the HdrStrHeap.

      The easiest fix for this is to completely walk all of the HdrHeap objects in the chain and sum up the size of every string; obviously this approach means that strings that were previously aliased will now become independent copies on coalesce; however, the alternative solution that allows continued aliasing would be pretty messy.

      I'm proposing we just properly determine the size but allow the user to minimizing coalescing by making the read only heap sizes configurable and the StrHdrHeap and HdrHeap default sizes configurable.

      Attachments

        Issue Links

          Activity

            People

              psudaemon Phil Sorber
              briang Brian Geffon
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: