thetumbled commented on code in PR #21030:
URL: https://github.com/apache/pulsar/pull/21030#discussion_r1301480969


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/SystemTopicBasedTopicPoliciesService.java:
##########
@@ -84,6 +86,8 @@ public class SystemTopicBasedTopicPoliciesService implements 
TopicPoliciesServic
     @VisibleForTesting
     final Map<TopicName, List<TopicPolicyListener<TopicPolicies>>> listeners = 
new ConcurrentHashMap<>();
 
+    final Map<TopicName, BlockingDeque<CompletableFuture>> results = new 
ConcurrentHashMap<>();

Review Comment:
   we have such redirection logic in: 
`org.apache.pulsar.broker.admin.impl.PersistentTopicsBase#preValidation`
   ```
                           return getPartitionedTopicMetadataAsync(topicName, 
false, false)
                               .thenCompose(metadata -> {
                                   if (metadata.partitions > 0) {
                                       return 
validateTopicOwnershipAsync(TopicName.get(topicName.toString()
                                       + PARTITIONED_TOPIC_SUFFIX + 0), 
authoritative);
                                   } else {
                                       return 
validateTopicOwnershipAsync(topicName, authoritative);
                                   }
                           });
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to