-
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 no response to client when handleSubscribe because PendingAckHandleImpl init fail #13655
fix no response to client when handleSubscribe because PendingAckHandleImpl init fail #13655
Conversation
@wenbingshen:Thanks for your contribution. For this PR, do we need to update docs? |
@congbobo184 @codelipenghui PTAL, Thanks. |
Hi, please fix the checkstyle. |
sure. I have fixed the checkstyle. |
@wenbingshen:Thanks for providing doc info! |
/pulsarbot run-failure-checks |
@@ -141,6 +142,9 @@ private void initPendingAckStore() { | |||
}).exceptionally(e -> { | |||
acceptQueue.clear(); | |||
changeToErrorState(); | |||
pendingAckHandleCompletableFuture.completeExceptionally( | |||
new TransactionPendingAckException.TransactionPendingAckStoreProviderException( | |||
e.getMessage())); |
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.
e.getMessage() -> e.getCause() is much better.
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.
Thanks for your review. Good idea. I have addressed your comment. PTAL.
52ff293
to
de15c63
Compare
/pulsarbot run-failure-checks |
2 similar comments
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
…leImpl init fail (#13655) Fixes #13654 ### Modifications When the initialization of `PendingAckHandleImpl` fails, `pendingAckHandleCompletableFuture` will not be exception or complete, then `org.apache.pulsar.broker.service.persistent.PersistentSubscription#addConsumer` will not return any response to the client. ``` public CompletableFuture<Void> addConsumer(Consumer consumer) { return pendingAckHandle.pendingAckHandleFuture().thenCompose(future -> ...) } ``` (cherry picked from commit 528c972)
Fixes #13654
Modifications
When the initialization of
PendingAckHandleImpl
fails,pendingAckHandleCompletableFuture
will not be exception or complete, thenorg.apache.pulsar.broker.service.persistent.PersistentSubscription#addConsumer
will not return any response to the client.Documentation
Need to update docs?
no-need-doc