Skip to content
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][admin] Fix half deletion when attempt to topic with a incorrect API #23002

Merged
merged 5 commits into from
Jul 10, 2024

Conversation

poorbarcode
Copy link
Contributor

@poorbarcode poorbarcode commented Jul 4, 2024

Motivation & Modifications

Background
The correct usage of deleting topics:

  • non-partitioned: pulsar-admin topics delete <topic>
  • partitioned: pulsar-admin topics delete-partitioned-topic <topic>

Issue

  1. When you attempt to delete a partitioned topic with pulsar-admin topics delete <topic>, you will get a 404 error: tpxxx is not found. But the schemas have been deleted, and the topic is still there.
  2. When you attempt to delete a partitioned topic with pulsar-admin topics delete-partitioned-topic <topic>, you will get a 404 error: tpxxx is not found. But the schemas have been deleted, and the topic is still there.

Modifications

  1. Fix half deletion issue
  2. Improve error response.
    a. tp not found -> tpxxx is a partitioned topic, please call delete-partitioned-topic instead.
    b. 404 -> 409. If the users get a 404, they will assume it has been deleted, so change the response code to 409.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: x

@poorbarcode poorbarcode added this to the 3.4.0 milestone Jul 4, 2024
@poorbarcode poorbarcode self-assigned this Jul 4, 2024
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Jul 4, 2024
@poorbarcode poorbarcode changed the title [improve][admin] Improve error message when attempt to delete a partitioned topic with a wrong API [fix][admin] Fix half deletion when attempt to topic with a incorrect API Jul 4, 2024
@poorbarcode
Copy link
Contributor Author

/pulsarbot rerun-failure-checks

@poorbarcode poorbarcode requested a review from nodece July 9, 2024 03:21
Copy link
Member

@nodece nodece left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@poorbarcode poorbarcode merged commit 1f34497 into apache:master Jul 10, 2024
50 of 51 checks passed
@poorbarcode
Copy link
Contributor Author

Since PIP-344 was not cherry-picked into branch-3.2, I remove the label release:3.2.4

poorbarcode added a commit that referenced this pull request Jul 15, 2024
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Jul 15, 2024
… API (apache#23002)

(cherry picked from commit 1f34497)
(cherry picked from commit 0fab9ed)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Jul 15, 2024
… API (apache#23002)

(cherry picked from commit 1f34497)
(cherry picked from commit 0fab9ed)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants