GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||
GeezerVison is showing github.com — [fix][client] Fail messages immediately in ProducerImpl when in terminal state by merlimat · Pull Request #25317 · apache/pulsar Conversation
Contributor
MotivationWhen a producer reaches a terminal state (Terminated, Closed, or ProducerFenced), messages entering processOpSendMsg() would be added to pendingMessages with no connection to write them, leaving them stuck until sendTimeout (default 30s). Add a terminal state check in processOpSendMsg() before adding to the pending queue, failing the message immediately with the appropriate exception. Also fix testTerminateWhilePublishing to close the producer after termination, since the broker's CommandCloseProducer races with CommandSendError responses, preventing the client from learning about topic termination through the normal error path. ModificationsVerifying this change
(Please pick either of the following options) This change is a trivial rework / code cleanup without any test coverage. (or) This change is already covered by existing tests, such as (please describe tests). (or) This change added tests and can be verified as follows: (example:)
Does this pull request potentially affect one of the following parts:If the box was checked, please highlight the changes
Documentation
Matching PR in forked repositoryPR in forked repository:
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…nal state When a producer reaches a terminal state (Terminated, Closed, or ProducerFenced), messages entering processOpSendMsg() would be added to pendingMessages with no connection to write them, leaving them stuck until sendTimeout (default 30s). Add a terminal state check in processOpSendMsg() before adding to the pending queue, failing the message immediately with the appropriate exception. Also fix testTerminateWhilePublishing to close the producer after termination, since the broker's CommandCloseProducer races with CommandSendError responses, preventing the client from learning about topic termination through the normal error path.
|
There was an error while loading. Please reload this page.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@ ## master #25317 +/- ## ========================================== Coverage 72.66% 72.66% + Complexity 34651 34244 -407 ========================================== Files 1967 1967 Lines 156326 156342 +16 Branches 17812 17813 +1 ========================================== + Hits 113591 113612 +21 + Misses 33671 33638 -33 - Partials 9064 9092 +28
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…nal state (apache#25317) (cherry picked from commit 11f30ad)
…nal state (apache#25317) (cherry picked from commit 11f30ad)
…nal state (apache#25317) (cherry picked from commit 11f30ad)
…nal state (apache#25317) (cherry picked from commit 11f30ad)
…nal state (apache#25317) (cherry picked from commit 1b5c818) (cherry picked from commit 0aa4dca)
…nal state (apache#25317) (cherry picked from commit 1b5c818)
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.