bbeaudreault commented on code in PR #4967:
URL: https://github.com/apache/hbase/pull/4967#discussion_r1090065051


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java:
##########
@@ -3431,8 +3441,10 @@ private void scan(HBaseRpcController controller, 
ScanRequest request, RegionScan
             // there are more values to be read server side. If there aren't 
more values,
             // marking it as a heartbeat is wasteful because the client will 
need to issue
             // another ScanRequest only to realize that they already have all 
the values
-            if (moreRows && timeLimitReached) {
-              // Heartbeat messages occur when the time limit has been reached.
+            if (moreRows && (timeLimitReached || (sizeLimitReached && 
results.isEmpty()))) {

Review Comment:
   I tried removing the `results.isEmpty()` part here and it causes 
TestRawAsyncScanCursor.testSizeLimit to fail due to an unexpected cursor. I 
tried testing on this branch, and on branch-2 (without this patch). So I think 
it's good to keep `results.isEmpty()` so that we only return cursor when 
expected.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to