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 (#23185)

(cherry picked from commit 73433cd)
  • Loading branch information
poorbarcode authored and lhotari committed Aug 19, 2024
1 parent 761685e commit 846e718
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3682,6 +3682,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 846e718

Please sign in to comment.