liguangcheng commented on issue #10054:
URL: https://github.com/apache/pulsar/issues/10054#issuecomment-986378032


   > I took a look at the test and the issue is that by the time the consumer 
has acknowledged all the messages there is still no valid snapshot, therefore 
we cannot advance the position of the replicated subscription.
   > 
   > After the topic is created, the brokers will start sending markers and 
creating snapshots of the cursors. This happens with default cadence of 1sec.
   > 
   > If the consumer asks everything before that time, there will be no 
snapshot created yet. If traffic continues, after few secs, the subscription 
will be replicated correctly.
   > 
   > To "fix" the test I just put a `Thread.sleep(2 * 
config1.getReplicatedSubscriptionsSnapshotFrequencyMillis())` before the 
producer gets started.
   > 
   > One other minor thing in the test is that we don't need to create the 
subscription in R2 (
   > 
   > 
https://github.com/apache/pulsar/blob/05f1f7e58fc54648e7843335dfb64d413d9b6a1e/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ReplicatorSubscriptionTest.java#L94
   > 
   > ). Creating the replicated subscription in R1 will automatically trigger 
the creation of the subscription in all the clusters (where the topic is being 
replicated).
   
   thank you @merlimat , The cause of the problem is that **continuous produce 
messages are required**, and one-time production messages that are too short 
indeed cannot trigger the replication state.


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