lhotari commented on code in PR #24427:
URL: https://github.com/apache/pulsar/pull/24427#discussion_r2297782661


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/SystemTopicBasedTopicPoliciesService.java:
##########
@@ -107,8 +111,16 @@ protected NamespaceEventsSystemTopicFactory initialize() {
     @VisibleForTesting
     final Map<TopicName, List<TopicPolicyListener>> listeners = new 
ConcurrentHashMap<>();
 
+    private final Map<NamespaceName, TopicPolicyMessageHandlerTracker> 
topicPolicyMessageHandlerTrackers =
+            new ConcurrentHashMap<>();
+
     private final AsyncLoadingCache<NamespaceName, 
SystemTopicClient.Writer<PulsarEvent>> writerCaches;
 
+    // Sequencer for policy updates per topic and per policy type 
(global/local)
+    // Key: Pair<TopicName, Boolean (isGlobal)>, Value: 
CompletableFuture<Void> representing the last update in sequence
+    private final ConcurrentHashMap<Pair<TopicName, Boolean>, 
CompletableFuture<Void>> topicPolicyUpdateSequencer =

Review Comment:
   I guess there wouldn't be such a benefit in using 
`BooleanObjectPair<TopicName>` (or `ObjectBooleanPair<TopicName>`) since the 
`java.lang.Boolean` doesn't have the same problem as the number wrappers which 
would have to create a wrapper for each primitive number.



-- 
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