KnightChess commented on code in PR #11174: URL: https://github.com/apache/hudi/pull/11174#discussion_r1627542176
########## hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/compact/strategy/BoundedIOCompactionStrategy.java: ########## @@ -44,10 +44,10 @@ public List<HoodieCompactionOperation> orderAndFilter(HoodieWriteConfig writeCon for (HoodieCompactionOperation op : operations) { long opIo = op.getMetrics().get(TOTAL_IO_MB).longValue(); targetIORemaining -= opIo; - finalOperations.add(op); - if (targetIORemaining <= 0) { + if (targetIORemaining < 0) { Review Comment: if first op `TOTAL_IO_MB` bigger than targetIO, it will always return empty. ########## hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/compact/strategy/BoundedIOCompactionStrategy.java: ########## @@ -44,10 +44,10 @@ public List<HoodieCompactionOperation> orderAndFilter(HoodieWriteConfig writeCon for (HoodieCompactionOperation op : operations) { long opIo = op.getMetrics().get(TOTAL_IO_MB).longValue(); targetIORemaining -= opIo; - finalOperations.add(op); - if (targetIORemaining <= 0) { + if (targetIORemaining < 0) { Review Comment: if first op `TOTAL_IO_MB` bigger than targetIO, it will always return empty. -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org