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

Phil Yang commented on HBASE-15325:
-----------------------------------

Sorry, I had a mistake. The test failed on asserting row key, the bug is not 
because scanner reset to the start of the row, it is set to the end of last 
result's row. So there will be some cells missing rather than repeating.
{code}
if (this.lastResult != null) {
          // The region has moved. We need to open a brand new scanner at
          // the new location.
          // Reset the startRow to the row we've seen last so that the new
          // scanner starts at the correct row. Otherwise we may see previously
          // returned rows again.
          // (ScannerCallable by now has "relocated" the correct region)
          if (scan.isReversed()) {
            scan.setStartRow(createClosestRowBefore(lastResult.getRow()));
          } else {
            scan.setStartRow(Bytes.add(lastResult.getRow(), new byte[1]));
          }
        }
{code}

> ResultScanner allowing partial result will reset to the start of the row if 
> the region is moved between two rpc requests
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-15325
>                 URL: https://issues.apache.org/jira/browse/HBASE-15325
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 1.1.3
>            Reporter: Phil Yang
>            Assignee: Phil Yang
>            Priority: Critical
>         Attachments: 15325-test.txt
>
>
> HBASE-11544 allow scan rpc return partial of a row to reduce memory usage for 
> one rpc request. And client can setAllowPartial or setBatch to get several 
> cells in a row instead of the whole row.
> However, the status of the scanner is saved on server and we need this to get 
> the next part if there is a partial result before. If we move the region to 
> another RS, client will get a NotServingRegionException and open a new 
> scanner to the new RS which will be regarded as a new scan from the start of 
> this row. So we will see the cells which have been seen before.



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

Reply via email to