Jason918 commented on code in PR #17371:
URL: https://github.com/apache/pulsar/pull/17371#discussion_r964322754


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java:
##########
@@ -1036,6 +1036,14 @@ public CompletableFuture<Void> deleteTopic(String topic, 
boolean forceDelete) {
                         new IllegalStateException("Delete forbidden topic is 
replicated on clusters " + clusters));
             }
 
+            // shadow topic should be deleted first.
+            if (t.isShadowReplicated()) {
+                final List<String> shadowTopics = 
t.getShadowReplicators().keys();
+                log.error("Delete forbidden. Topic {} is replicated to shadow 
topics: {}", topic, shadowTopics);
+                return FutureUtil.failedFuture(new IllegalStateException(
+                        "Delete forbidden. Topic " + topic + " is replicated 
to shadow topics: "));

Review Comment:
   Updated. 



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

Reply via email to