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

Josh Elser commented on HBASE-13262:
------------------------------------

bq. Currently the batch limit and size limit are being checked, but the batch 
limit should be replaced with a check against i >= rows. 

Cool, I just noticed this was actually the reason things were broken. Checking 
only the sizeLimit and batchLimit was causing moreResultsInReason=false when we 
just had a normal moreValues. I think the positive case for moreResultsInRegion 
would then be:

{code}
null != state && (state.sizeLimitReached() || i >= rows || 
state.hasMoreValues())
{code}

bq. I think your intention was probably to check the caching limit it's just 
that the terminology surrounding batch is a little misleading (even the javadoc 
on Scan#setBatch is misleading; "values" instead of "cells").

You read my confusion like a book :). The differentiation between caching and 
batch is rather confusing. Thank you for clarifying.

bq. Also, just a note on backporting to 0.98 and branch-1.0. Because NextState 
is only in branch-1+, the corresponding check for size limit will simply be 
currentScanResultSize >= maxResultSize (looks like you have it covered in this 
patch actually) and the cache limit check will still be i>=rows.

Cool thank you for commenting on those, I've only started looking back there 
now (1.1 and 2.0 were enough to try to wrap my head around together). FWIW, 
[~lhofhansl]'s recommendation about removing ScanResultWithContext will likely 
make the 0.98 and 1.0 backport much easier (at least the cherry-pick was a bit 
painful locally). I am leaning towards that now as well.

> ResultScanner doesn't return all rows in Scan
> ---------------------------------------------
>
>                 Key: HBASE-13262
>                 URL: https://issues.apache.org/jira/browse/HBASE-13262
>             Project: HBase
>          Issue Type: Bug
>          Components: Client
>    Affects Versions: 2.0.0, 1.1.0
>         Environment: Single node, pseduo-distributed 1.1.0-SNAPSHOT
>            Reporter: Josh Elser
>            Assignee: Josh Elser
>            Priority: Blocker
>             Fix For: 2.0.0, 1.1.0, 0.98.13
>
>         Attachments: 13262-0.98-testpatch.txt, HBASE-13262-branch-1-v2.patch, 
> HBASE-13262-branch-1-v3.patch, HBASE-13262-branch-1.patch, 
> HBASE-13262-v1.patch, HBASE-13262-v2.patch, HBASE-13262-v3.patch, 
> HBASE-13262-v4.patch, HBASE-13262.patch, regionserver-logging.diff, 
> testrun_0.98.txt, testrun_branch1.0.txt
>
>
> Tried to write a simple Java client again 1.1.0-SNAPSHOT.
> * Write 1M rows, each row with 1 family, and 10 qualifiers (values [0-9]), 
> for a total of 10M cells written
> * Read back the data from the table, ensure I saw 10M cells
> Running it against {{04ac1891}} (and earlier) yesterday, I would get ~20% of 
> the actual rows. Running against 1.0.0, returns all 10M records as expected.
> [Code I was 
> running|https://github.com/joshelser/hbase-hwhat/blob/master/src/main/java/hbase/HBaseTest.java]
>  for the curious.



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

Reply via email to