-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Close the replicator and replication client when delete cluster. #11342
Close the replicator and replication client when delete cluster. #11342
Conversation
Currently, when a cluster been deleted, the replicator and the replication client will not been closed. The producer of the replicator will try to reconnect to the deleted cluster continuously. We should close and cleanup the replicator and the replication client for the deleted cluster.
if (ot.isPresent()) { | ||
Replicator r = ot.get().getReplicators().get(clusterName); | ||
if (r != null && r.isConnected()) { | ||
r.disconnect(true).whenComplete((v, e) -> f.complete(null)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we should let failIfHasBacklog=false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch, changed to false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…nt when delete cluster in branch-2.7.
…nt when delete cluster in branch-2.7.
…che#11342) ### Motivation Currently, when a cluster has been deleted, the replicator and the replication client will not be closed. The producer of the replicator will try to reconnect to the deleted cluster continuously. We should close and clean up the replicator and the replication client for the deleted cluster. ### Verifying this change A new test was added for verifying the replicator and the replication client will be closed after the cluster is deleted.
…n delete cluster in branch-2.7. (#11390)
) ### Motivation Currently, when a cluster has been deleted, the replicator and the replication client will not be closed. The producer of the replicator will try to reconnect to the deleted cluster continuously. We should close and clean up the replicator and the replication client for the deleted cluster. ### Verifying this change A new test was added for verifying the replicator and the replication client will be closed after the cluster is deleted. (cherry picked from commit 8a4147e)
…che#11342) Currently, when a cluster has been deleted, the replicator and the replication client will not be closed. The producer of the replicator will try to reconnect to the deleted cluster continuously. We should close and clean up the replicator and the replication client for the deleted cluster. A new test was added for verifying the replicator and the replication client will be closed after the cluster is deleted. (cherry picked from commit 8a4147e)
…che#11342) Currently, when a cluster has been deleted, the replicator and the replication client will not be closed. The producer of the replicator will try to reconnect to the deleted cluster continuously. We should close and clean up the replicator and the replication client for the deleted cluster. A new test was added for verifying the replicator and the replication client will be closed after the cluster is deleted. (cherry picked from commit 8a4147e) (cherry picked from commit 60d462a)
…che#11342) ### Motivation Currently, when a cluster has been deleted, the replicator and the replication client will not be closed. The producer of the replicator will try to reconnect to the deleted cluster continuously. We should close and clean up the replicator and the replication client for the deleted cluster. ### Verifying this change A new test was added for verifying the replicator and the replication client will be closed after the cluster is deleted.
Motivation
Currently, when a cluster has been deleted, the replicator and the replication client will not be closed.
The producer of the replicator will try to reconnect to the deleted cluster continuously.
We should close and clean up the replicator and the replication client for the deleted cluster.
Verifying this change
A new test was added for verifying the replicator and the replication client will be closed after the cluster is deleted.
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation
This is a bug fix, no need documentation.