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

hongbin ma updated KYLIN-688:
-----------------------------
    Fix Version/s:     (was: v0.7.1)
                   v0.8.1

> possible memory leak for segmentIterator
> ----------------------------------------
>
>                 Key: KYLIN-688
>                 URL: https://issues.apache.org/jira/browse/KYLIN-688
>             Project: Kylin
>          Issue Type: Bug
>          Components: Storage - HBase
>    Affects Versions: v0.6.5, v0.7.1, v0.8.1
>            Reporter: hongbin ma
>            Assignee: hongbin ma
>             Fix For: v0.8.1
>
>
> SerializedHBaseTupleIterator:
>  @Override
>     public ITuple next()  {
>         //TODO: last not closed
>         ITuple t = null;
>         while (hasNext()) {
>             if (segmentIterator.hasNext()) {
>                 t = segmentIterator.next();
>                 scanCount++;
>                 break;
>             } else {
>                 try {
>                     segmentIterator.close();
>                 } catch (IOException e) {
>                     e.printStackTrace();
>                 }
>                 segmentIterator = segmentIteratorIterator.next();
>             }
>         }
>         return t;
>     }
> =======================
> currently segmentIterator is closed only when segmentIterator.hasNext() 
> returns false. the last segmentIterator will never reach here because the 
> outer while(hasNext()) would exit the whole loop first.
> What's more, due to the complexity of "while(hasNext())", even non-last 
> segmentIterator might not get the chance to be closed.



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

Reply via email to