HDDS-15328. Fix sleep time in RetryInvocationHandler#10317
Open
adoroszlai wants to merge 4 commits into
Open
Conversation
ivandika3
approved these changes
May 21, 2026
Contributor
There was a problem hiding this comment.
@adoroszlai Thanks for catching this issue, LGTM +1.
I think this will subtly change the retry wait behavior where instead of waiting for a fixed delay, it will wait based on the calculated time when RetryInfo is created. However, I think the difference should not be noticeable in most cases since RetryInfo creation in handleException and waitTime calculation in processWaitTimeAndRetryInfo should be similar most of the time (unless there is a huge pause between handleException and processWaitTimeAndRetryInfo or other cases like when retryTime is not set to null in processRetryInfo somehow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Sleep period in
RetryInvocationHandlershould bewaitTime, notdelay(see #10310 (comment)).RetryInfo.retryTimeis calculated when it is created:ozone/hadoop-hdds/common/src/main/java/org/apache/hadoop/io_/retry/RetryInvocationHandler.java
Lines 253 to 254 in c917a6e
waitTimeis calculated beforesleepas:ozone/hadoop-hdds/common/src/main/java/org/apache/hadoop/io_/retry/RetryInvocationHandler.java
Lines 85 to 86 in c917a6e
RetryInfo.delayis used for actual sleep time:ozone/hadoop-hdds/common/src/main/java/org/apache/hadoop/io_/retry/RetryInvocationHandler.java
Lines 131 to 136 in c917a6e
Since this is such a small change, also make some improvements in this area:
TestRetryProxyfrom Hadooptest-clientprofile inpom.xmlto include tests ported from Hadoop (more tests to come in follow-up PRs)https://issues.apache.org/jira/browse/HDDS-15328
How was this patch tested?
https://github.com/adoroszlai/ozone/actions/runs/26150721145