poorbarcode opened a new pull request, #22890:
URL: https://github.com/apache/pulsar/pull/22890

   ### Motivation
   
   **Background**
   1. the method `PersistentTopic.addReplicationCluster` will remove orphan 
replication cursors, see https://github.com/apache/pulsar/pull/19972
   2. when a topic is loading up, it will initialize replicators by the cursors 
named `pulsar.repl.<remote cluster>`
   
   **Issue**
   - Mechanism `2` was called before topic-level policies initializing, so it 
will remove the replicator and cursor when a topic is loading up.
   - After the topic level policies are initialized, the broker will create a 
new replicator with a new cursor(start at the `latest position`), and all the 
messages in backlog are lost.
   
   ### Modifications
   
   Fix the issue: make Mechanism `2` being called after the topic-level 
policies were loaded.
   
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update 
later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   ### Matching PR in forked repository
   
   PR in forked repository: x
   


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