-
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] Cannot access message data inside ProducerInterceptor#onSendAcknowledgement #23791
[fix][client] Cannot access message data inside ProducerInterceptor#onSendAcknowledgement #23791
Conversation
…nSendAcknowledgement
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
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.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.
LGTM.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #23791 +/- ##
============================================
+ Coverage 73.57% 74.09% +0.51%
+ Complexity 32624 31759 -865
============================================
Files 1877 1853 -24
Lines 139502 143374 +3872
Branches 15299 16276 +977
============================================
+ Hits 102638 106229 +3591
+ Misses 28908 28774 -134
- Partials 7956 8371 +415
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…nSendAcknowledgement (apache#23791) (cherry picked from commit fdfe00a) (cherry picked from commit c981972)
…nSendAcknowledgement (apache#23791) (cherry picked from commit fdfe00a) (cherry picked from commit c981972)
Motivation
In #22393, the payload of message get released before calling
ProducerInterceptor#onSendAcknowledgement
, hence access message data insideProducerInterceptor#onSendAcknowledgement
will get exception below:Modifications
ProducerInterceptor#onSendAcknowledgement
is invoked to ensure the payload is accessible during the callbackInterceptorsTest#testProducerInterceptorAccessMessageData
Verifying this change
This change added tests and can be verified as follows:
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: Shawyeok#22