sunhelly commented on code in PR #4536:
URL: https://github.com/apache/hbase/pull/4536#discussion_r1118390358


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java:
##########
@@ -768,7 +768,11 @@ public boolean next(List<Cell> outResult, ScannerContext 
scannerContext) throws
         // One last chance to break due to size limit. The INCLUDE* cases 
above already check
         // limit and continue. For the various filtered cases, we need to 
check because block
         // size limit may have been exceeded even if we don't add cells to 
result list.
-        if (scannerContext.checkSizeLimit(LimitScope.BETWEEN_CELLS)) {
+        // And when reaching the heartbeat cells, try to return from the loop.
+        if (
+          scannerContext.checkSizeLimit(LimitScope.BETWEEN_CELLS)
+            || kvsScanned % cellsPerHeartbeatCheck == 0

Review Comment:
   After HBASE-27558 that you added size limit checker in the loop, it can 
applies to only compaction scans now.
   `if (scannerContext.checkSizeLimit(LimitScope.BETWEEN_CELLS)) {
             return 
scannerContext.setScannerState(NextState.MORE_VALUES).hasMoreValues();
           }`
   



-- 
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