-
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][broker] AbstractBatchedMetadataStore - use AlreadyClosedException instead of IllegalStateException #19284
[fix][broker] AbstractBatchedMetadataStore - use AlreadyClosedException instead of IllegalStateException #19284
Conversation
…stead of IllegalStateException
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
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.
Do we have a test to cover this case?
@codelipenghui I am not sure that it is worth to cover this change with a test case. |
…on instead of IllegalStateException (apache#19284) (cherry picked from commit d3e112e)
Motivation
When the broker is shutting down AbstractBatchedMetadataStore completes exceptionally the pending operations with a generic IllegalStateException. All the code that is depending on the MetadataStore usually expects instances of MetadataStoreException and they may not properly react to this error.
This is generally not a big deal because the broker is shutting down, but we should improve it
Modifications
Complete the pending operations with AlreadyClosedException instead of IllegalStateException
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
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