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

Pulsar allows creating duplicate topics with the same name #7183

Closed
deltasquare4 opened this issue Jun 5, 2020 · 2 comments
Closed

Pulsar allows creating duplicate topics with the same name #7183

deltasquare4 opened this issue Jun 5, 2020 · 2 comments
Labels
area/admin area/broker release/2.5.1 type/bug The PR fixed a bug or issue reported a bug
Milestone

Comments

@deltasquare4
Copy link

Describe the bug
Pulsar 2.5.0 allows creating two topics (one partitioned, and the other non-partitioned) with the same name through Admin API. This behaviour is consistent across both persistent and non-persistent topics.

To Reproduce
Steps to reproduce the behavior:

  1. Create a partitioned topic in a tenant/namespace (e.g. persistent://public/test/duplicate-test)
  2. Create a non-partitioned topic in tenant/namespace by the same name as above

Expected behavior
Aamin API should return HTTP 409 with the following response, like it does if the order of steps above is reveresed:

{
    "reason": "This topic already exists"
}

Additional context
It does not allow topics with duplicate names as expected when reversing the order of steps above (create non-partitioned topic first, and then try to create partitioned topic by the same name. Response with HTTP 409 as described above)

Additionally, both topics do exist and show up in their respective list API calls. When trying to publish messages to the topic, they always seem to be received by the partitioned topic. If partitioned topic is removed, the publish still succeeds, and the messages go to the non-partitioned topic by the same name.

@sijie
Copy link
Member

sijie commented Jun 8, 2020

@deltasquare4 thank you for reporting this. Are you interested in contributing a fix?

@codelipenghui
Copy link
Contributor

This issue is fixed by #5943 and I have double-checked on the master branch. So close this issue first, if the problem is still there, please reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/admin area/broker release/2.5.1 type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

No branches or pull requests

3 participants