poorbarcode commented on code in PR #21203:
URL: https://github.com/apache/pulsar/pull/21203#discussion_r1336600952


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractReplicator.java:
##########
@@ -116,6 +118,13 @@ public String getRemoteCluster() {
     // This method needs to be synchronized with disconnects else if there is 
a disconnect followed by startProducer
     // the end result can be disconnect.
     public synchronized void startProducer() {
+        // This method comes from some actives call and may be call again 
after disconnect
+        // so here we will first mark isClosed is false
+        isClosed = false;

Review Comment:
   > Normally this is the case. But here, we can call the method startProducer 
again after call the method disconnect.
   In fact, this class can be closed and opened again.
   > In fact, this class can be closed and opened again.
   
   So we should only set the stat of Replicator to `closed` when it is exactly 
is closed, right?



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