Uploaded image for project: 'Apache Trafodion (Retired)'
  1. Apache Trafodion (Retired)
  2. TRAFODION-2636

Modest memory leak in metadata context and with CQS

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3-incubating
    • 2.2.0
    • sql-cmp
    • None

    Description

      Selva pointed me to this leak. He found that we leak GroupAttributes objects in the metadata context.

      It turns out that the ControlDB object makes copies of CQD and CQS RelExpr trees and stores them in the context heap. This is not a good idea, since RelExpr and the associate GroupAttributes classes are not designed for heaps other than the statement heap. GroupAttributes, for example, hard-codes the statement heap in its constructor calls to ValueIdSets. That probably isn't a visible problem in ControlDB, however.

      For CQDs, the allocations and deallocations seem to match. For CQS, we allocate ControlQueryShape objects and also the actual shapes. However, we deallocate only the ControlQueryShape objects, not the shapes themselves.

      A simple, conservative fix is therefore to deallocate the shapes as well. In the longer term, it would be good to avoid storing RelExprs in the context heap.

      Attachments

        Issue Links

          Activity

            People

              hzeller Hans Zeller
              hzeller Hans Zeller
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: