poorbarcode commented on code in PR #22890:
URL: https://github.com/apache/pulsar/pull/22890#discussion_r1639532502
##########
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:
I want to leave this log there because this log helped me to find this issue
😂
--
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]