TheR1sing3un commented on code in PR #12316:
URL: https://github.com/apache/hudi/pull/12316#discussion_r1855712511
##########
hudi-common/src/test/java/org/apache/hudi/common/util/TestRetryHelper.java:
##########
@@ -49,4 +51,19 @@ public void testCheckIfExceptionInRetryList() throws
Exception {
retry = (boolean) privateOne.invoke(retryHelper, new
UnsupportedOperationException("test"));
assertTrue(retry);
}
+
+ @Test
+ public void testCheckTooManyTimes() {
+ int maxRetries = 100;
+ RetryHelper retryHelper = new RetryHelper(INTERVAL_TIME, maxRetries,
INTERVAL_TIME, null);
+ AtomicInteger counter = new AtomicInteger(0);
+ assertDoesNotThrow(() -> {
+ retryHelper.start(() -> {
Review Comment:
> 100 times retry does not really reach the upper threshold
`LONG.MAX_VALUE`.
2^100 > 2^63-1 (LONG.MAX_VALUE)
> did you encounter the overflow in production?
Yes! It fails our writer task.
--
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]