You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by st...@apache.org on 2024/09/04 11:28:47 UTC

(phoenix) branch 5.1 updated: PHOENIX-7387 SnapshotScanner's next method is ignoring the boolean value from hbase's nextRaw method (#1971)

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

stoty pushed a commit to branch 5.1
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/5.1 by this push:
     new 755fcd69f8 PHOENIX-7387 SnapshotScanner's next method is ignoring the boolean value from hbase's nextRaw method (#1971)
755fcd69f8 is described below

commit 755fcd69f8f1902ff8e594d8ac1f1cd4d553cddf
Author: Abhradeep Kundu <ab...@gmail.com>
AuthorDate: Wed Sep 4 16:53:07 2024 +0530

    PHOENIX-7387 SnapshotScanner's next method is ignoring the boolean value from hbase's nextRaw method (#1971)
    
    Co-authored-by: abhradeep.kundu <ab...@cloudera.com>
---
 .../src/main/java/org/apache/phoenix/iterate/SnapshotScanner.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/phoenix-core/src/main/java/org/apache/phoenix/iterate/SnapshotScanner.java b/phoenix-core/src/main/java/org/apache/phoenix/iterate/SnapshotScanner.java
index 9af06f69d3..2d6faa88d9 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/iterate/SnapshotScanner.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/iterate/SnapshotScanner.java
@@ -115,14 +115,14 @@ public class SnapshotScanner extends AbstractClientScanner {
   @Override
   public Result next() throws IOException {
     values.clear();
-    scanner.nextRaw(values);
+    boolean hasMore = scanner.nextRaw(values);
     statisticsCollector.collectStatistics(values);
-    if (values.isEmpty()) {
+    if (hasMore || !values.isEmpty()) {
+      return Result.create(values);
+    } else {
       //we are done
       return null;
     }
-
-    return Result.create(values);
   }
 
   @Override