Apache9 commented on code in PR #5428:
URL: https://github.com/apache/hbase/pull/5428#discussion_r1386716309


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ScannerContext.java:
##########
@@ -467,6 +467,7 @@ public enum NextState {
     MORE_VALUES(true, false),
     NO_MORE_VALUES(false, false),
     SIZE_LIMIT_REACHED(true, true),
+    FILTERED_ROWS_LIMIT_REACHED(true, true),

Review Comment:
   Why not store the limit value in ScannerContext?



##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionScannerImpl.java:
##########
@@ -629,17 +640,37 @@ private boolean nextInternal(List<Cell> results, 
ScannerContext scannerContext)
     }
   }
 
-  private void incrementCountOfRowsFilteredMetric(ScannerContext 
scannerContext) {
+  private boolean incrementCountOfRowsFilteredMetric(ScannerContext 
scannerContext)
+    throws DoNotRetryIOException {
     region.filteredReadRequestsCount.increment();
     if (region.getMetrics() != null) {
       region.getMetrics().updateFilteredRecords();
     }
 
     if (scannerContext == null || !scannerContext.isTrackingMetrics()) {
-      return;
+      return false;
+    }
+
+    long countOfRowsFiltered = 
scannerContext.getMetrics().countOfRowsFiltered.incrementAndGet();

Review Comment:
   We'd better not mix things up with metrics? Metrics is not a critical thing 
usually.



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