Skip to content

Commit

Permalink
[improve] [broker] Optimize performance for checking max topics when …
Browse files Browse the repository at this point in the history
…the topic is a system topic (apache#23185)

(cherry picked from commit 73433cd)
  • Loading branch information
poorbarcode authored and lhotari committed Aug 19, 2024
1 parent 9a090f7 commit 09bc877
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3728,6 +3728,9 @@ public CompletableFuture<SchemaVersion> deleteSchema(TopicName topicName) {
}

private CompletableFuture<Void> checkMaxTopicsPerNamespace(TopicName topicName, int numPartitions) {
if (isSystemTopic(topicName)) {
return CompletableFuture.completedFuture(null);
}
return pulsar.getPulsarResources().getNamespaceResources()
.getPoliciesAsync(topicName.getNamespaceObject())
.thenCompose(optPolicies -> {
Expand Down

0 comments on commit 09bc877

Please sign in to comment.