-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[fix][client] Create the retry producer async #23157
[fix][client] Create the retry producer async #23157
Conversation
The consumer implementation is creating the retry producer synchronously, potentially unexpectedly blocking the calling thread. This changes modifies this behaviour to fit with how the dead letter queue producer is created—i.e. using the async APIs offloaded to the internal pinned executor.
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. Thanks for the contribution @omarkj
I'm unable to replicate the failed test locally. |
Unfortunately we have a lot of flaky tests. There's a solution called "pulsarbot" which can rerun the failed GitHub Action builds when you add a comment "/pulsarbot rerun-failure-checks" to the PR. I'll perform that now. |
/pulsarbot rerun-failure-checks |
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
Outdated
Show resolved
Hide resolved
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
Outdated
Show resolved
Hide resolved
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.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.
Please check the comments about error handling the creation of the retry letter producer fails.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #23157 +/- ##
============================================
+ Coverage 73.57% 74.56% +0.98%
- Complexity 32624 33637 +1013
============================================
Files 1877 1920 +43
Lines 139502 144434 +4932
Branches 15299 15803 +504
============================================
+ Hits 102638 107693 +5055
+ Misses 28908 28490 -418
- Partials 7956 8251 +295
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Co-authored-by: Ómar Yasin <[email protected]>
Co-authored-by: Ómar Yasin <[email protected]> (cherry picked from commit a025938)
Co-authored-by: Ómar Yasin <[email protected]> (cherry picked from commit a025938)
Co-authored-by: Ómar Yasin <[email protected]> (cherry picked from commit a025938)
Co-authored-by: Ómar Yasin <[email protected]> (cherry picked from commit a025938) (cherry picked from commit 507d402)
Co-authored-by: Ómar Yasin <[email protected]> (cherry picked from commit a025938) (cherry picked from commit f2e1920)
Co-authored-by: Ómar Yasin <[email protected]> (cherry picked from commit a025938) (cherry picked from commit 507d402)
Co-authored-by: Ómar Yasin <[email protected]> (cherry picked from commit a025938) (cherry picked from commit 507d402)
Co-authored-by: Ómar Yasin <[email protected]>
Motivation
The consumer implementation is creating the retry producer synchronously, potentially unexpectedly blocking the calling thread.
Modifications
This changes modifies this behaviour to fit with how the dead letter queue producer is created—i.e. using the async APIs offloaded to the internal pinned executor.
Verifying this change
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: