-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[improve][client] Add backoff for seek
#20963
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
codelipenghui
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.
Is it possible to add a test to cover the new changes?
| log.error("[{}][{}] Failed to reset subscription: {}", topic, subscription, e.getCause().getMessage()); | ||
| clearIncomingMessages(); | ||
| seekFuture.complete(null); | ||
| }).exceptionally(e -> { |
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.
If the exception is retriable, I think we should also perform a backoff.
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.
Ah, the server side will response with MetadataError/UnknownError, which we can't retry. I see other methods here, also not handle exception to take a retry.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #20963 +/- ##
=============================================
+ Coverage 37.11% 72.91% +35.80%
- Complexity 12250 32287 +20037
=============================================
Files 1698 1875 +177
Lines 129813 141668 +11855
Branches 14156 15974 +1818
=============================================
+ Hits 48179 103301 +55122
+ Misses 75318 30137 -45181
- Partials 6316 8230 +1914
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Added test. |
Motivation
Currently, only
seekdoesn't support backoff in consumer side, see :pulsar/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
Lines 2151 to 2166 in 2ab184e
Documentation
docdoc-requireddoc-not-neededdoc-complete