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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]