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

Memory leak observed in Repository context

    XMLWordPrintableJSON

Details

    Description

      Currently repository context in mxosrvr uses the same allocated psrvrstmt to execute different statements - upsert into the metric_session_table, insert and update the records for metric_query_aggr_table and metric_query_table. This could lead to memory leaks over time.

      Ideally we should be preparing each of these statements and repeatedly executing rather than execdirect.

      For the current implementation as long as master executor executes deallocate statement, this memory leak can be avoided or reduced. Rather than give back the statement and allocate it again we could reallocate the statement handle. This would avoid any thread conflicts with psrvrstmt handlers from default and repository context.

      Repository context also generates "missing stats" warnings for tables in "REPOS" schema.

      Also for queries that get reprepared a small memory leak was observed when google profiler was used.

      So changes planned:
      1. Use REALLOCSQLMXHDLS() after each execute.
      2. Avoid missing stats message
      3. Handle delete of tmpSqlString in reprepare.

      Attachments

        Issue Links

          Activity

            People

              arvind-narain Arvind Narain
              arvind-narain Arvind Narain
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: