yuruguo edited a comment on issue #13431: URL: https://github.com/apache/pulsar/issues/13431#issuecomment-1000726553
@gaozhangmin > Direct reason: `optTopic` is null: You are right and I also find it, `Topic` is not loaded in broker and maybe we need to delete from schema registry, so I modify the logic of `deleteSchemaStorage()` method as below: ![image](https://user-images.githubusercontent.com/13013780/147335889-7f0c89e7-df94-4240-a77f-d9cb359a3433.png) Then I can get the expected result. **In addition**, we actually have another chance to delete the schema in `internalDeletePartitionedTopic()` but unfortunately we missed the parameter `deleteSchema` https://github.com/apache/pulsar/blob/9f599c9572e5d9b1f15efa6e895e7eb29b284e57/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java#L625-L626 corrcet as below: ``` pulsar().getAdminClient().topics() .deleteAsync(topicNamePartition.toString(), force, deleteSchema) ``` Then I can get the expected result. **NOTE**:Either of these two ways can solve this problem -- 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-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org