fhan688 commented on code in PR #20189:
URL: https://github.com/apache/hudi/pull/20189#discussion_r4226438292
##########
hudi-common/src/main/java/org/apache/hudi/common/util/RateLimiter.java:
##########
@@ -68,27 +94,59 @@ public boolean tryAcquire(int numPermits) {
}
public boolean acquire(int numOps) {
+ ValidationUtils.checkArgument(numOps > 0 && numOps <= maxPermits,
Review Comment:
Good point. I’ll add a no-argument `acquire()` backed by a private
unchecked single-permit acquisition path, while keeping argument validation in
`acquire(int)`. Both Flink per-record call sites will be updated to use the new
overload, with tests covering the no-argument path and the existing validation
behavior.
--
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]