-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Broker] Remove check resource when delete failure domain #13421
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
385643d to
d12d474
Compare
### Motivation This PR is used to keep same behavior with Pulsar 2.8 and 2.7 version. In Pulsar 2,7 and 2.8, when delete a non-existent failure domain resource, it will return 404 status code. In Pulsar 2.9, when delete a non-existent failure domain resource, it will return 200 status code. Reproduce in Pulsar 2.8: ``` $ docker run -itd \ -p 6650:6650 \ -p 8080:8080 \ apachepulsar/pulsar:2.8.1 \ bin/pulsar standalone $ pulsarctl clusters delete-failure-domain standalone non-existent-failure-domain [✖] code: 404 reason: Domain-name non-existent-failure-domain or cluster standalone does not exist ``` Reproduce in Pulsar 2.9: ``` $ docker run -itd \ -p 6650:6650 \ -p 8080:8080 \ apachepulsar/pulsar:2.9.0 \ bin/pulsar standalone $ pulsarctl clusters delete-failure-domain standalone non-existent-failure-domain Delete failure domain [non-existent-failure-domain] for cluster [standalone] succeed ``` Affected version: 2.9.x ### Modifications - Remove check resource exists when call the delete failure domain API ### Documentation Need to update docs? - [x] `no-need-doc` Signed-off-by: Zixuan Liu <[email protected]>
d12d474 to
86691d2
Compare
Member
Author
|
/pulsarbot run-failure-checks |
Contributor
|
@nodece Do you know which change introduced the breaking change? |
Member
Author
|
@codelipenghui This issue was caused by #11693. |
Contributor
codelipenghui
left a comment
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.
@nodece Could you please help a test to avoid regression?
Member
Author
|
@codelipenghui Added test. |
Member
Author
|
/pulsarbot run-failure-checks |
Signed-off-by: Zixuan Liu <[email protected]>
2b735d6 to
56796b4
Compare
codelipenghui
approved these changes
Dec 27, 2021
315157973
approved these changes
Dec 27, 2021
codelipenghui
pushed a commit
that referenced
this pull request
Dec 30, 2021
### Motivation This PR is used to keep same behavior with Pulsar 2.8 and 2.7 version. In Pulsar 2.7 and 2.8, when delete a non-existent failure domain resource, it will return 404 status code. In Pulsar 2.9, when delete a non-existent failure domain resource, it will return 200 status code. Reproduce in Pulsar 2.8: ``` $ docker run -itd \ -p 6650:6650 \ -p 8080:8080 \ apachepulsar/pulsar:2.8.1 \ bin/pulsar standalone $ pulsarctl clusters delete-failure-domain standalone non-existent-failure-domain [✖] code: 404 reason: Domain-name non-existent-failure-domain or cluster standalone does not exist ``` Reproduce in Pulsar 2.9: ``` $ docker run -itd \ -p 6650:6650 \ -p 8080:8080 \ apachepulsar/pulsar:2.9.0 \ bin/pulsar standalone $ pulsarctl clusters delete-failure-domain standalone non-existent-failure-domain Delete failure domain [non-existent-failure-domain] for cluster [standalone] succeed ``` Affected version: 2.9.x This issue was caused by #11693. ### Modifications - Remove check resource exists when call the `ClusterResources#deleteFailureDomain()` - Add check resource exists when call the `ClusterResources#deleteFailureDomains()` (cherry picked from commit 7f4aac5)
wuzhanpeng
pushed a commit
to wuzhanpeng/pulsar
that referenced
this pull request
Jan 5, 2022
### Motivation
This PR is used to keep same behavior with Pulsar 2.8 and 2.7 version.
In Pulsar 2.7 and 2.8, when delete a non-existent failure domain resource, it will return 404 status code.
In Pulsar 2.9, when delete a non-existent failure domain resource, it will return 200 status code.
Reproduce in Pulsar 2.8:
```
$ docker run -itd \
-p 6650:6650 \
-p 8080:8080 \
apachepulsar/pulsar:2.8.1 \
bin/pulsar standalone
$ pulsarctl clusters delete-failure-domain standalone non-existent-failure-domain
[✖] code: 404 reason: Domain-name non-existent-failure-domain or cluster standalone does not exist
```
Reproduce in Pulsar 2.9:
```
$ docker run -itd \
-p 6650:6650 \
-p 8080:8080 \
apachepulsar/pulsar:2.9.0 \
bin/pulsar standalone
$ pulsarctl clusters delete-failure-domain standalone non-existent-failure-domain
Delete failure domain [non-existent-failure-domain] for cluster [standalone] succeed
```
Affected version: 2.9.x
This issue was caused by apache#11693.
### Modifications
- Remove check resource exists when call the `ClusterResources#deleteFailureDomain()`
- Add check resource exists when call the `ClusterResources#deleteFailureDomains()`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/broker
cherry-picked/branch-2.9
Archived: 2.9 is end of life
doc-not-needed
Your PR changes do not impact docs
release/2.9.2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
This PR is used to keep same behavior with Pulsar 2.8 and 2.7 version.
In Pulsar 2.7 and 2.8, when delete a non-existent failure domain resource, it will return 404 status code.
In Pulsar 2.9, when delete a non-existent failure domain resource, it will return 200 status code.
Reproduce in Pulsar 2.8:
Reproduce in Pulsar 2.9:
Affected version: 2.9.x
This issue was caused by #11693.
Modifications
ClusterResources#deleteFailureDomain()ClusterResources#deleteFailureDomains()Documentation
Need to update docs?
no-need-docSigned-off-by: Zixuan Liu [email protected]