This is an automated email from the ASF dual-hosted git repository.

vjasani pushed a commit to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.5 by this push:
     new b80cba1e033 HBASE-28357 MoveWithAck#isSuccessfulScan for Region 
movement should use Region End Key for limiting scan to one region only. (#5677)
b80cba1e033 is described below

commit b80cba1e033865a8cc3b54309ae87a609133ede0
Author: Monani Mihir <[email protected]>
AuthorDate: Mon Feb 12 17:16:32 2024 -0800

    HBASE-28357 MoveWithAck#isSuccessfulScan for Region movement should use 
Region End Key for limiting scan to one region only. (#5677)
    
    Signed-off-by: Viraj Jasani <[email protected]>
---
 .../src/main/java/org/apache/hadoop/hbase/util/MoveWithAck.java      | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/MoveWithAck.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/MoveWithAck.java
index bf1fef80998..ddd55fc92f6 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/MoveWithAck.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/MoveWithAck.java
@@ -110,8 +110,9 @@ class MoveWithAck implements Callable<Boolean> {
    * Tries to scan a row from passed region
    */
   private void isSuccessfulScan(RegionInfo region) throws IOException {
-    Scan scan = new 
Scan().withStartRow(region.getStartKey()).setRaw(true).setOneRowLimit()
-      .setMaxResultSize(1L).setCaching(1).setFilter(new 
FirstKeyOnlyFilter()).setCacheBlocks(false);
+    Scan scan = new 
Scan().withStartRow(region.getStartKey()).withStopRow(region.getEndKey(), false)
+      .setRaw(true).setOneRowLimit().setMaxResultSize(1L).setCaching(1)
+      .setFilter(new FirstKeyOnlyFilter()).setCacheBlocks(false);
     try (Table table = conn.getTable(region.getTable());
       ResultScanner scanner = table.getScanner(scan)) {
       scanner.next();

Reply via email to