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

Hudson commented on PHOENIX-1650:
---------------------------------

SUCCESS: Integrated in Phoenix-master #589 (See 
[https://builds.apache.org/job/Phoenix-master/589/])
PHOENIX-1650 Possible resource leak in upsert select query (Rajeshbabu) 
(jtaylor: rev e0a81a09ec7aeab44a2bce597d19850e7c6a7846)
* phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java


> Possible resource leak in upsert select query
> ---------------------------------------------
>
>                 Key: PHOENIX-1650
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1650
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Rajeshbabu Chintaguntla
>            Assignee: Rajeshbabu Chintaguntla
>            Priority: Critical
>             Fix For: 5.0.0, 4.3
>
>         Attachments: PHOENIX-1650.patch
>
>
> In the upsert select query execution path if parallelIteratorFactory then we 
> are not closing the iterator which results in resource leak.
> {code}
>                     ResultIterator iterator = queryPlan.iterator();
>                     if (parallelIteratorFactory == null) {
>                         return upsertSelect(statement, tableRef, projector, 
> iterator, columnIndexes, pkSlotIndexes);
>                     }
>                     parallelIteratorFactory.setRowProjector(projector);
>                     parallelIteratorFactory.setColumnIndexes(columnIndexes);
>                     parallelIteratorFactory.setPkSlotIndexes(pkSlotIndexes);
>                     Tuple tuple;
>                     long totalRowCount = 0;
>                     while ((tuple=iterator.next()) != null) {// Runs query
>                         Cell kv = tuple.getValue(0);
>                         totalRowCount += 
> PLong.INSTANCE.getCodec().decodeLong(kv.getValueArray(), kv.getValueOffset(), 
> SortOrder.getDefault());
>                     }
>                     // Return total number of rows that have been updated. In 
> the case of auto commit being off
>                     // the mutations will all be in the mutation state of the 
> current connection.
>                     return new MutationState(maxSize, 
> statement.getConnection(), totalRowCount);
> {code}



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

Reply via email to