xichen01 commented on code in PR #6420:
URL: https://github.com/apache/ozone/pull/6420#discussion_r1590376024


##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/DBScanner.java:
##########
@@ -305,7 +335,7 @@ private void processRecords(ManagedRocksIterator iterator,
   }
 
   private boolean withinLimit(long i) {
-    return limit == -1L || i < limit;
+    return recordsPerFile > 0 || limit == -1L || i < limit;

Review Comment:
   if the `recordsPerFile > 0` is `true`, the subsequent judgments will be 
short-circuited, including the `i < limit` then the limit will be invalidated. 
This is not a expected function.
   



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to