Fix cluster metadata remove
@@ -139,13 +139,13 @@ func (r *Replicator) listenToClusterMetadataChange() {
delete(r.namespaceProcessors, clusterName)
}
+ if clusterInfo := newClusterMetadata[clusterName]; clusterInfo != nil && clusterInfo.Enabled {
remoteAdminClient, err := r.clientBean.GetRemoteAdminClient(clusterName)
if err != nil {
// Cannot find remote cluster info.
// This should never happen as cluster metadata should have the up-to-date data.
panic(fmt.Sprintf("Bug found in cluster metadata with error %v", err))
}
- if clusterInfo := newClusterMetadata[clusterName]; clusterInfo != nil && clusterInfo.Enabled {
processor := newNamespaceReplicationMessageProcessor(
currentClusterName,
clusterName,
