GitHub user manishgupta88 opened a pull request:

    https://github.com/apache/carbondata/pull/1074

    [CARBONDATA-1212] Memory leak in case of compaction when unsafe is true

    Problem: Memory leak in case of compaction when unsafe is true
    
    Analysis: In case of compaction, queryExecutor object is formed for 
multiple blocks but the objects are not retained and finish method is called 
only on the last instance created for query executor. Due to this the memory 
allocated to precious objects is not released which can lead to out of memory 
issue.
    
    Fix: Add all the object to a list and call finish method on all the objects 
so that memory gets released
    Proof: Files attached for memory allocation and release count before and 
after code changes during compaction.
    
[Compaction_result_after_code_change.txt](https://github.com/apache/carbondata/files/1091871/Compaction_result_after_code_change.txt)
    
[Compaction_result_before_code_change.txt](https://github.com/apache/carbondata/files/1091872/Compaction_result_before_code_change.txt)
    


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

    $ git pull https://github.com/manishgupta88/incubator-carbondata 
compaction_memory_leak_fix

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

    https://github.com/apache/carbondata/pull/1074.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 #1074
    
----
commit b13cbcf7fb8c4f0f6968b05877133f60dcb8c270
Author: manishgupta88 <[email protected]>
Date:   2017-06-21T14:39:12Z

    Problem: Memory leak in case of compaction when unsafe is true
    
    Analysis: In case of compaction, queryExecutor object is formed for 
multiple blocks but the objects are not retained and finish method is called 
only on the last instance created for query executor. Due to this the memory 
allocated to precious objects is not released which can lead to out of memory 
issue.
    
    Fix: Add all the object to a list and call finish method on all the objects 
so that memory gets released

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to