ramkrish86 commented on a change in pull request #2483:
URL: https://github.com/apache/hbase/pull/2483#discussion_r499444077
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
##########
@@ -3498,6 +3501,18 @@ public ScanResponse scan(final RpcController controller,
final ScanRequest reque
throw new ServiceException(e);
}
HRegion region = rsh.r;
+ // If the start row is the actual start Row of the region and end row is
actual end row of region
+ // or
+ // If the stop is not specified or the stop Row is greater than the end
key of the current region
+ if ((Bytes.equals(rsh.s.getStartRow(),
region.getRegionInfo().getStartKey())
+ && Bytes.equals(rsh.s.getStopRow(), region.getRegionInfo().getEndKey()))
+ || Bytes.equals(rsh.s.getStopRow(), HConstants.EMPTY_END_ROW)
+ || (Bytes.compareTo(region.getRegionInfo().getEndKey(),
rsh.s.getStopRow()) <= 0
+ && !Bytes.equals(region.getRegionInfo().getEndKey(),
HConstants.EMPTY_END_ROW))) {
+ if(!region.getTableDescriptor().isMetaTable()) {
Review comment:
`Is this check going to happen for every scan#next calls? We should do
this only once for 1st req which create the scanner on region.`
I thought about this again. We can account it once only once but if say a
scanner calls next() 10 times and every time RsRpcServices#scan() gets called
we account the rpc scan request as 10. Now if we account for the new metric
only once then it means 1 out of every 10 scan request is full region scan.
Then we are not having a ratio which we want. Instead if we had accounted all
10 as full regoin scan then we can atleast have the correct ratio. Correct me
if am wrong.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]