Skip to content

Conversation

@nodece
Copy link
Member

@nodece nodece commented Dec 21, 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()

Documentation

Need to update docs?

  • no-need-doc

Signed-off-by: Zixuan Liu [email protected]

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Dec 21, 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

### 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]>
@nodece nodece changed the title [Broker] Remove check path when delete failure domain [Broker] Remove check resource when delete failure domain Dec 21, 2021
@nodece
Copy link
Member Author

nodece commented Dec 21, 2021

/pulsarbot run-failure-checks

@codelipenghui
Copy link
Contributor

@nodece Do you know which change introduced the breaking change?

@nodece
Copy link
Member Author

nodece commented Dec 21, 2021

@codelipenghui This issue was caused by #11693.

Copy link
Contributor

@codelipenghui codelipenghui left a 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?

@nodece
Copy link
Member Author

nodece commented Dec 23, 2021

@codelipenghui Added test.

@nodece
Copy link
Member Author

nodece commented Dec 23, 2021

/pulsarbot run-failure-checks

@nodece nodece requested a review from codelipenghui December 23, 2021 15:46
Signed-off-by: Zixuan Liu <[email protected]>
@codelipenghui codelipenghui merged commit 7f4aac5 into apache:master Dec 28, 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)
@codelipenghui codelipenghui added the cherry-picked/branch-2.9 Archived: 2.9 is end of life label Dec 30, 2021
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants