Skip to content

[Bug] Replication clusters cannot be cleared for a namespace #24640

Description

@omarkj

Search before reporting

  • I searched in the issues and found nothing similar.

Read release policy

  • I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.

User environment

Pulsar 4.0.5

Issue Description

Apache Pulsar allows replication clusters to be set at the namespace level. This means every topic in a namespace gets replicated as configured.

To date there is no way to disable replication at the namespace level. If an empty list of clusters is passed in, Pulsar returns an error:

 curl -XPOST  https://:CLUSTER_ENDPOINT/admin/v2/:TENANT/:NS/:TOPIC/replication -D '[]'
{"reason":"ClusterIds should not be null or empty"}

The expectation is for this to disable replication.

Error messages

{"reason":"ClusterIds should not be null or empty"}

Reproducing the issue

Apache Pulsar allows replication clusters to be set at the namespace level. This means every topic in a namespace gets replicated as configured.

To date there is no way to disable replication at the namespace level. If an empty list of clusters is passed in, Pulsar returns an error:

 curl -XPOST  https://:CLUSTER_ENDPOINT/admin/v2/:TENANT/:NS/:TOPIC/replication -D '[]'
{"reason":"ClusterIds should not be null or empty"}

The expectation is for this to disable replication.

Additional information

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugThe PR fixed a bug or issue reported a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions