-
Notifications
You must be signed in to change notification settings - Fork 5
Add retry logic for RS3 get/getoffsets requests #420
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
Conversation
rodesai
left a comment
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.
Overall the approach LGTM. Couple of minor comments inline.
kafka-client/src/test/java/dev/responsive/kafka/internal/db/rs3/RS3KVTableTest.java
Outdated
Show resolved
Hide resolved
| } | ||
| } | ||
|
|
||
| public static class Connector { |
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.
this is added so that we have a hook to plug in a mock?
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.
Added mainly because there are more parameters now. The static connect worked nicely when there were only two parameters, but it started feeling a little clumsy with the additions from the patch. Having a place to hook in mocks could be useful as well I guess.
...client/src/test/java/dev/responsive/kafka/internal/db/rs3/client/grpc/GrpcRS3ClientTest.java
Outdated
Show resolved
Hide resolved
rodesai
left a comment
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.
LGTM!
Get requests are probably the simplest to retry, so I've started there. This patch adds a new
responsive.rs3.retry.timeout.msand uses exponential backoff logic (borrowed from Kafka) to retry after UNAVAILABLE errors from the rs3 server.