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/04/28 07:10:42 UTC

[GitHub] [pulsar] mattisonchao commented on a diff in pull request #15363: [fix] [broker] Disabled deduplication, but ledger-store will not be d…

mattisonchao commented on code in PR #15363:
URL: https://github.com/apache/pulsar/pull/15363#discussion_r860556076


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java:
##########
@@ -3060,7 +3060,21 @@ public void onUpdate(TopicPolicies policies) {
                 checkReplicationAndRetryOnFailure();
             }
 
-            checkDeduplicationStatus();
+            /**
+             * When execute command "pulsar-admin topicPolicies get-deduplication persistent://{tenant}/{ns}/{topic}"
+             * but "store.asyncRemoveCursor('pulsar.dedup')" failure, the 'pulsar-dedup' cursor will be disabled,
+             * zk-node: "/managed-ledgers/{tenant}/{ns}/persistent/{topic}/pulsar.dedup" still exists.
+             * Then this topic's ledger-store will not be deleted anymore, even if all message has been acknowledged.
+             * So when `checkDeduplicationStatus()` failure, stop this topic.
+             */
+            try {
+                checkDeduplicationStatus().get();

Review Comment:
   At first glance, we cannot call sync method inside async method.



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