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

Lars Hofhansl commented on HBASE-4488:
--------------------------------------

I see that Store.compactStore does the same thing. The same reasoning goes 
there, that currently we are lucky that StoreScanner.next() never returns false 
when more rows are waiting.

There's even a comment about a do/while loop, but then it's just a while loop.

{code}
// since scanner.next() can return 'false' but still be delivering data,
// we have to use a do/while loop.
ArrayList<KeyValue> kvs = new ArrayList<KeyValue>();
// Limit to "hbase.hstore.compaction.kv.max" (default 10) to avoid OOME
while (scanner.next(kvs,this.compactionKVMax)) {
{code}

Looking at the history of the file this has been like this forever. This is a 
bug waiting to happen.
Should we have another patch with this one, or a separate jira?
                
> Store could miss rows during flush
> ----------------------------------
>
>                 Key: HBASE-4488
>                 URL: https://issues.apache.org/jira/browse/HBASE-4488
>             Project: HBase
>          Issue Type: Sub-task
>          Components: regionserver
>    Affects Versions: 0.92.0, 0.94.0
>            Reporter: Lars Hofhansl
>            Assignee: Lars Hofhansl
>             Fix For: 0.92.0
>
>         Attachments: 4488.txt
>
>
> While looking at HBASE-4344 I found that my change HBASE-4241 contains a 
> critical mistake:
> The while(scanner.next(kvs)) loop is incorrect and might miss the last edits.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to