lhotari commented on code in PR #23360:
URL: https://github.com/apache/pulsar/pull/23360#discussion_r1793349811
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/SystemTopicBasedTopicPoliciesService.java:
##########
@@ -133,7 +133,13 @@ public CompletableFuture<Void>
deleteTopicPoliciesAsync(TopicName topicName) {
if
(NamespaceService.isHeartbeatNamespace(topicName.getNamespaceObject()) ||
isSelf(topicName)) {
return CompletableFuture.completedFuture(null);
}
- return sendTopicPolicyEvent(topicName, ActionType.DELETE, null);
+ return
pulsarService.getNamespaceService().checkTopicExists(NamespaceEventsSystemTopicFactory
+
.getEventsTopicName(topicName.getNamespaceObject())).thenCompose(topicExistsInfo
-> {
+ if (topicExistsInfo.isExists()) {
+ return CompletableFuture.completedFuture(null);
+ }
+ return sendTopicPolicyEvent(topicName, ActionType.DELETE, null);
Review Comment:
please add a brief code comment about the reason for this 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]