mattisonchao commented on code in PR #16622:
URL: https://github.com/apache/pulsar/pull/16622#discussion_r957262485
##########
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.
// Once all repl producers are closed, we can delete the topic,
// provided no remote producers connected to the broker.
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]