Repository: hbase Updated Branches: refs/heads/0.94 e127626d3 -> c51e19afe
HBASE-11667 Comment ClientScanner logic for NSREs. Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/c51e19af Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c51e19af Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c51e19af Branch: refs/heads/0.94 Commit: c51e19afec1925de7769c24e0dbd2bfcf90a184e Parents: e127626 Author: Lars Hofhansl <[email protected]> Authored: Wed Aug 6 11:36:01 2014 -0700 Committer: Lars Hofhansl <[email protected]> Committed: Wed Aug 6 11:36:01 2014 -0700 ---------------------------------------------------------------------- .../java/org/apache/hadoop/hbase/client/ClientScanner.java | 7 +++++++ 1 file changed, 7 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/c51e19af/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java b/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java index be93d58..7e72d57 100644 --- a/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java +++ b/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java @@ -304,7 +304,14 @@ public class ClientScanner extends AbstractClientScanner { // Else, its signal from depths of ScannerCallable that we got an // NSRE on a next and that we need to reset the scanner. 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) this.scan.setStartRow(this.lastResult.getRow()); + // Skip first row returned. We already let it out on previous // invocation. skipFirst = true;
