You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/08/29 12:26:42 UTC
[GitHub] [pulsar] mattisonchao commented on a diff in pull request #16622: Skip topics with remote replication producers in topic inactivity check
mattisonchao commented on code in PR #16622:
URL: https://github.com/apache/pulsar/pull/16622#discussion_r957261890
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java:
##########
@@ -2195,6 +2195,15 @@ public void checkGC() {
CompletableFuture<Void> replCloseFuture = new CompletableFuture<>();
if (TopicName.get(topic).isGlobal()) {
+ // topics with remote (replication) producer should be skipped
+ if (hasRemoteProducers()) {
+ if (log.isDebugEnabled()) {
+ log.debug("[{}] Global topic has connected remote producers. Not a candidate for GC",
+ topic);
+ }
+ return;
+ }
+
// For global namespace, close repl producers first.
Review Comment:
From this comment, it seems we have to close the repl producer first. Otherwise, in a two-way replication scenario. We can get to the "deadlock" and the topic is never deleted.
I'm not sure if it's your expected behaviour or if I'm missing some replicator close logic.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org