equanz edited a comment on pull request #13644:
URL: https://github.com/apache/pulsar/pull/13644#issuecomment-1009726741


   > why change `NamespacesBase`
   
   After enabling `*Test2.java` cases, I found some bugs. This PR includes 
these fixes.
   
   * For https://github.com/apache/pulsar/pull/11693 changes, can't run 
`org.apache.pulsar.broker.admin.v1.V1_AdminApi2Test#namespaceAntiAffinity` 
correctly. Because `org.apache.pulsar.broker.admin.AdminResource#namespaceName` 
is not set from `{cluster}/antiAffinity/{group}` endpoint.
     - 
https://github.com/equanz/pulsar/blob/2da21db57977715e21cc8155a5b31c09a3b0e967/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java#L1891
       - I'll consider to remove `validateNamespacePolicyOperation` from this 
method (and add some validation)
   * Currently, can't run 
`org.apache.pulsar.broker.admin.AdminApi2Test#testForceDeleteNamespace` 
correctly. In current code, try to delete topics and namespace bundles 
simultaneously. However, broker can't 
[close](https://github.com/apache/pulsar/blob/793dd910fc17b0e149f4b554b54cad55ca5bc479/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java#L1253-L1265)
 (through unloading) and 
[delete](https://github.com/apache/pulsar/blob/793dd910fc17b0e149f4b554b54cad55ca5bc479/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java#L1132-L1134)
 persistent topic simultaneously because of `isClosingOrDeleting` field.
     - 
https://github.com/equanz/pulsar/blob/2da21db57977715e21cc8155a5b31c09a3b0e967/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java#L464-L482
   
   > why  delete method `testDistinguishTopicTypeWhenForceDeleteNamespace`
   
   For https://github.com/apache/pulsar/pull/12663 changes, can't put invalid 
path like 
https://github.com/apache/pulsar/blob/793dd910fc17b0e149f4b554b54cad55ca5bc479/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest2.java#L1597-L1599
 . 
   I wasn't sure this case was still needed, so I deleted it.
   If we should run `testDistinguishTopicTypeWhenForceDeleteNamespace` case, 
use some method instead of put.
   


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