Technoboy- opened a new pull request #14605:
URL: https://github.com/apache/pulsar/pull/14605


   ### Motivation
   PIP 92 has introduced topic policies across clusters. But after 
https://github.com/apache/pulsar/pull/12517, if the policy is not global, it 
set the replicate cluster to an empty set.
   ```
   PulsarEvent.PulsarEventBuilder builder = PulsarEvent.builder();
    if (policies == null || !policies.isGlobalPolicies()) {
        // we don't need to replicate local policies to remote cluster, so set 
`replicateTo` to empty.
        builder.replicateTo(new HashSet<>());
   }
   ```
   It should set the `replicateTo` with the local cluster, not an empty set.
   
   Otherwise,  it will cause the system event to be replicated. Details are 
here :
   
https://github.com/apache/pulsar/blob/d4c2e613d305f8f785b5ef357b7cbe2ccc271043/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentReplicator.java#L319-L328
   
   ### Documentation
     
   - [x] `no-need-doc` 
     
   
   
   


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