nodece commented on code in PR #22890:
URL: https://github.com/apache/pulsar/pull/22890#discussion_r1637855265


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java:
##########
@@ -553,6 +547,21 @@ private void createPersistentSubscriptions() {
         checkReplicatedSubscriptionControllerState();
     }
 
+    private CompletableFuture<Void> removeOrphanReplicationCursors() {
+        List<CompletableFuture<Void>> futures = new ArrayList<>();
+        List<String> replicationClusters = 
topicPolicies.getReplicationClusters().get();
+        for (ManagedCursor cursor : ledger.getCursors()) {
+            if (cursor.getName().startsWith(replicatorPrefix)) {
+                String remoteCluster = 
PersistentReplicator.getRemoteCluster(cursor.getName());
+                if (!replicationClusters.contains(remoteCluster)) {
+                    log.warn("Remove the replicator because the cluster '{}' 
does not exist", remoteCluster);

Review Comment:
   Please feel free to remove this warning. The removeReplicator will print an 
info log when a replicator will be removed.



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