Skip to content

[fix][broker]Namespaces can be created with may empty replication_clusters policy - #25551

Merged
poorbarcode merged 5 commits into
apache:masterfrom
poorbarcode:fix/create_ns_with_allowed_cluster
Apr 20, 2026
Merged

[fix][broker]Namespaces can be created with may empty replication_clusters policy#25551
poorbarcode merged 5 commits into
apache:masterfrom
poorbarcode:fix/create_ns_with_allowed_cluster

Conversation

@poorbarcode

@poorbarcode poorbarcode commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Motivation

Before #24860, the namespace-level policy: replication_clusters will never be empty; after #24860, it will be empty if a namespace is created with the following request

curl -x PUT http://localhost:50025/admin/v2/namespaces/{tenant}/{namespace}` -D `{"allowed_clusters": ["{current_cluster}"]}`

This will lead to some unexpected problems, such as the namespace not being able to be deleted normally and getting an error Failed to delete namespace {namespace} java.util.concurrent.CompletionException: org.apache.pulsar.broker.web.RestException: Cannot delete the global namespace {namespace}. There are still more than one replication cluster configured.

Modifications

Does this pull request potentially affect one of the following parts:

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

@poorbarcode poorbarcode changed the title [fix][broker]Namespaces can be created with an empty replication_clusters policy [fix][broker]Namespaces can be created with may empty replication_clusters policy Apr 20, 2026
@poorbarcode poorbarcode added the type/bug The PR fixed a bug or issue reported a bug label Apr 20, 2026
@lhotari

lhotari commented Apr 20, 2026

Copy link
Copy Markdown
Member

The test "org.apache.pulsar.broker.admin.AdminApi2Test > testCreateNamespaceWithEmptyReplicationClustersByHttp" fails.

@poorbarcode
poorbarcode merged commit 9033223 into apache:master Apr 20, 2026
43 checks passed
lhotari pushed a commit that referenced this pull request Apr 21, 2026
lhotari pushed a commit that referenced this pull request Apr 21, 2026
lhotari pushed a commit that referenced this pull request Apr 21, 2026
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Apr 23, 2026
…sters policy (apache#25551)

(cherry picked from commit 9033223)
(cherry picked from commit 9ff7700)
nodece pushed a commit to ascentstream/pulsar that referenced this pull request May 27, 2026
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.

3 participants