You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2021/08/11 12:55:00 UTC

[GitHub] [hbase] bbeaudreault commented on a change in pull request #3576: HBASE-26122: Only create ScannerContext for Gets with setMaxResultSize > 0 (ADDENDUM)

bbeaudreault commented on a change in pull request #3576:
URL: https://github.com/apache/hbase/pull/3576#discussion_r686802431



##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionScannerImpl.java
##########
@@ -240,6 +240,9 @@ public synchronized boolean next(List<Cell> outResults, ScannerContext scannerCo
     }
     region.startRegionOperation(Operation.SCAN);
     try {
+      if (scannerContext == null) {

Review comment:
       @saintstack if you'd prefer, I can solve this at the source where we call next with null scannerContext in RsRpcServices and HRegion. It felt cleaner to do here, since we already have a default context and I can solve both issues with 1 change. The alternative would be to add another if branch in the 2 callers, something like:
   
   ```java
   if (scannerContext == null) {
     scanner.next(results);
   } else {
     scanner.next(results, scannerContext);
   }
   ```




-- 
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: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org