apache / pulsar

Apache Pulsar - distributed pub-sub messaging system
https://pulsar.apache.org/
Apache License 2.0
14.23k stars 3.58k forks source link

Pulsar 2.6 Delete admin/v2/persistent/firsttenant27/ns2/topic?force=true&deleteSchema=true #11503

Closed mfortman11 closed 1 year ago

mfortman11 commented 3 years ago

Always returns 204 successful even when the topic has been deleted

liangyuanpeng commented 3 years ago

Use pulsar-admin tested in pulsar 2.8.0 and got 404(Topic not found).

[root@node123 apache-pulsar-2.8.0]bin/pulsar-admin topics delete persistent://public/default/tp1
03:12:04.232 [AsyncHttpClient-7-1] WARN  org.apache.pulsar.client.admin.internal.BaseResource - [http://localhost:8080/admin/v2/persistent/public/default/tp1?force=false&deleteSchema=false] Failed to perform http delete request: javax.ws.rs.NotFoundException: HTTP 404 Not Found
Topic not found

And use rest-api test again.(use force=true&deleteSchema=true), just got 204.

[root@node123 apache-pulsar-2.8.0]# curl -i -X DELETE http://localhost:8080/admin/v2/persistent/public/default/tp1?force=true&deleteSchema=true 
[1] 8328
[root@node123 apache-pulsar-2.8.0]# HTTP/1.1 204 No Content
Date: Thu, 19 Aug 2021 07:17:13 GMT
broker-address: localhost
Server: Jetty(9.4.42.v20210604)
liangyuanpeng commented 3 years ago

I will create PR for fix this.

[root@node123 apache-pulsar-2.8.0]# curl -i -X DELETE http://192.168.3.218:8080/admin/v2/persistent/public/default/tp1?force=true&deleteSchema=true
[1] 13397
[root@node123 apache-pulsar-2.8.0]# HTTP/1.1 404 Not Found
Date: Thu, 19 Aug 2021 07:27:45 GMT
broker-address: localhost
Content-Type: application/json
Content-Length: 28
Server: Jetty(9.4.42.v20210604)

{"reason":"Topic not found"}
codelipenghui commented 2 years ago

The issue had no activity for 30 days, mark with Stale label.

tisonkun commented 1 year ago

Closed as stale. Please create a new issue if it's still relevant to the maintained versions.