-
Notifications
You must be signed in to change notification settings - Fork 514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDDS-5865. Made read retry max attempts and interval configurable. #6309
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SaketaChalamchala, Thanks for working on this.
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockInputStream.java
Outdated
Show resolved
Hide resolved
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/OzoneClientConfig.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SaketaChalamchala Thanks for updating patch, LGTM +1.
@SaketaChalamchala I recommend resetting |
retryPolicy = | ||
HddsClientUtils.createRetryPolicy(config.getMaxReadRetryCount(), | ||
TimeUnit.SECONDS.toMillis(config.getReadRetryInterval())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Storing this as static
seems unsafe.
-
Code is spread in 3 places:
- this class
- class that calls
setRetryPolicy
- class that uses the policy
It is hard to see if any usage may get outdated or
null
value. -
Concurrent clients may get unexpected results.
Thanks for the feedback @adoroszlai . Closing this PR and opened another one #6408 with updated changes. Please review those as well.
Also, will do this from next time. Thanks |
What changes were proposed in this pull request?
Retry policy when reading keys is hardcoded. Made the read retry max attempts and retry interval configurable in client configuration
ozone.client.max.read.retries
andozone.client.max.read.retries
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-5865
How was this patch tested?
Existing UT and integration tests should run as is.