You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/10/25 22:14:58 UTC

[jira] [Commented] (TRAFODION-2309) Memory leak observed in Repository context

    [ https://issues.apache.org/jira/browse/TRAFODION-2309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15606633#comment-15606633 ] 

ASF GitHub Bot commented on TRAFODION-2309:
-------------------------------------------

GitHub user arvind-narain opened a pull request:

    https://github.com/apache/incubator-trafodion/pull/783

    [TRAFODION-2309] Memory leak observed in Repository context

    Following changes:
    
    1. Use REALLOCSQLMXHDLS() after each execute.
    2. Avoid missing stats message in repository context
    3. Handle memory leak in reprepare (delete of tmpSqlString)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/arvind-narain/incubator-trafodion reposleak

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafodion/pull/783.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #783
    
----
commit 7f286d27d1a3f46df0ba1cf10e4624399208a50a
Author: Arvind Narain <na...@gmail.com>
Date:   2016-10-25T22:07:04Z

    [TRAFODION-2309] Memory leak observed in Repository context
    
    Following changes:
    
    1. Use REALLOCSQLMXHDLS() after each execute.
    2. Avoid missing stats message in repository context
    3. Handle memory leak in reprepare (delete of tmpSqlString

----


> 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
>
> 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.3.4#6332)