bbeaudreault commented on code in PR #4967:
URL: https://github.com/apache/hbase/pull/4967#discussion_r1089998253
##########
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:
This code block is to send a heartbeat response. Previously sizeLimitReached
was not checked here because all of the size limits could only be exceeded if
results had been collected. Now with block size check, we might exceed size
limit before collecting any results.
There's no need to set heartbeat response if there are results. It
especially seems important not to send cursor if there are results.
Given this size limit check is new, it felt best to check results.isEmpty so
we don't unnecessarily send heartbeat or cursor along with real results.
--
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]