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


##########
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:
   Indeed, even if all the read and update operations occur on the same broker, 
it remains crucial to serialize all such operations. Without serialization, the 
broker would still be incapable of ensuring that every modification is carried 
out on the most up-to-date data.
   
   ```
   Update from v1 -> v2
   Update from v1 -> v3
   ```
   
   The changes from v2 will be missed.
   
   Additionally, during the transfer of ownership, it is possible for ongoing 
updates to continue taking place on the old broker. Meanwhile, new requests 
directed to the new broker may still have an opportunity to update the data 
based on a potentially "dirty read."



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