[ 
https://issues.apache.org/jira/browse/TRAFODION-2309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Arvind Narain closed TRAFODION-2309.
------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.1-incubating

Fix for repository leak observed submitted via 
https://github.com/apache/incubator-trafodion/pull/783

> Memory leak observed in Repository context
> ------------------------------------------
>
>                 Key: TRAFODION-2309
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2309
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: connectivity-mxosrvr
>            Reporter: Arvind Narain
>            Assignee: Arvind Narain
>             Fix For: 2.1-incubating
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to