-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Handle NotAllowed Exception at the client side. #7430
Handle NotAllowed Exception at the client side. #7430
Conversation
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
2 similar comments
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
@@ -196,6 +196,7 @@ enum ServerError { | |||
|
|||
TransactionCoordinatorNotFound = 20; // Transaction coordinator not found error | |||
InvalidTxnStatus = 21; // Invalid txn status error | |||
NotAllowedError = 22; // Not allowed error |
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.
From the ci error. we need to handle this new error type in ClientConnection.cc
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
1 similar comment
/pulsarbot run-failure-checks |
* Handle NotAllowed Exception at the client side. (cherry picked from commit f8b2a23)
* Handle NotAllowed Exception at the client side. (cherry picked from commit f8b2a23)
* Handle NotAllowed Exception at the client side.
Motivation
Handle NotAllowed Exception at the client-side. Currently, if disable the key_shared feature at the broker side, the client will get a UnknownError from the broker and then the client will reconnect again. The reasonable behavior is to return a specific exception to users and let the client stop reconnect.
Modifications
Add NotAllowedError in the ServerError
Verifying this change
testDisableKeySharedSubscription
can cover this change.Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation