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 09:15:24 UTC

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

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


##########
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:
   Why ? I tried it , it works.



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