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

   ### Motivation
   
   **Steps to reproduce the issue**
   - Enable replication.
   - Send `10` messages to the local cluster then close the producer.
   - Call `pulsar-admin topics unload <topic>` and get an error due to the 
internal producer of the replicator close failing. 
   - The topic closed failed, so we assumed the topic could work as expected, 
but the replication stopped.
   
   **Root cause**
   - `pulsar-admin topics unload <topic>`  will wait for the clients(including 
`consumers & producers & replicators`) to close successfully, and it will fail 
if clients can not be closed successfully.
   - `replicator.producer` close failed causing the Admin API to fail, but 
there is a scheduled task that will retry to close `replicator.producer` which 
causes replication to stop. see 
https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractReplicator.java#L209
   
   ### Modifications
   
   since the "replicator.producer.closeAsync()" will retry after it fails, the 
topic unload should be successful.
   
   ### 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