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

James Taylor commented on PHOENIX-1456:
---------------------------------------

[~maryannxue] - please make sure to check this into the following branches: 
master, 3.0, 4.0, 3.2, 4.2. The 3.3 release will come from the 3.0 branch and 
the 3.2.2 release will come from the 3.2 branch. Same thing for 4.3 and 4.2.2 
releases. Then for the fixed versions use the version that corresponds to the 
release that'll contain the fix: 3.3, 3.2.2, 4.3, 4.2.2

> Incorrect query results caused by reusing buffers in SpoolingResultIterator
> ---------------------------------------------------------------------------
>
>                 Key: PHOENIX-1456
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1456
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 3.0.0, 4.0.0, 5.0.0
>            Reporter: Maryann Xue
>            Assignee: Maryann Xue
>             Fix For: 5.0.0, 4.2, 3.2
>
>         Attachments: 1456.patch
>
>   Original Estimate: 120h
>  Remaining Estimate: 120h
>
> The SpoolingResultIterator#OnDiskResultIterator switches between two 
> pre-allocated buffers as reading buffers for the tuple result, based on the 
> assumption that the outer ResultIterator consumes the returned tuple in a 
> streaming fashion and will never look back/forward outside 2-tuple span.
> However, some usages fail this assumption:
> 1. OrderedResultIterator: It adds all tuples into its MappedByteBufferQueue 
> on initialization, which is maintained by a priority queue before threshold 
> is reached and spooling to files. 
> This is not revealed in most test cases because, most importantly, 
> OrderedResultIterator is not commonly used on clientside (only 
> ClientProcessingPlan does)
> 2. Child/parent hash-join optimization, which uses a list of PK values to 
> create an InListExpression.
> It might be easy to walk around the second usage here though, but may need 
> more consideration on the first one.
> I am thinking to take away SpoolingResultIterator at all if there is an outer 
> ResultIterator being OrderedResultIterator.



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

Reply via email to