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

Ruilong Huo edited comment on HAWQ-426 at 2/20/16 2:40 PM:
-----------------------------------------------------------

The query resource parameters is kept in planned statement. So, the resolution 
is to make query resource parameters using the same memory context as planned 
statement. Thus, they can be freed at the same time. From implementation 
standpoint, we do a deep copy of query resource parameters in copy function of 
plannedstmt so that they use the same memory context.


was (Author: huor):
The query resource parameters is kept in planned statement. The resolution is 
to make query resource parameters using the same memory context as planned 
statement. Thus, they can be freed at the same time.

> Memory leak for query and prepared statement due to introduction of query 
> resource parameters
> ---------------------------------------------------------------------------------------------
>
>                 Key: HAWQ-426
>                 URL: https://issues.apache.org/jira/browse/HAWQ-426
>             Project: Apache HAWQ
>          Issue Type: Bug
>          Components: Core, Query Execution
>    Affects Versions: 2.0.0-beta-incubating
>            Reporter: Ruilong Huo
>            Assignee: Ruilong Huo
>             Fix For: 2.0.0
>
>
> During resource allocation for query and prepared statement, we cache the 
> query resource parameters so that query resource can be allocated for 
> multiple query execution after query preparation. Currently, query resource 
> parameters is kept in CacheMemoryContext or TopMemoryContext which may lead 
> to memory leak.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to