poorbarcode opened a new pull request, #17807: URL: https://github.com/apache/pulsar/pull/17807
Fixes: flaky test `NamespaceOwnershipListenerTests.testNamespaceBundleOwnershipListener` - https://github.com/poorbarcode/pulsar/actions/runs/3103585851/jobs/5027176671 ``` org.apache.pulsar.client.admin.PulsarAdminException$ConflictException: Cannot delete non empty bundle at org.apache.pulsar.client.admin.PulsarAdminException.wrap(PulsarAdminException.java:252) at org.apache.pulsar.client.admin.internal.BaseResource.sync(BaseResource.java:351) at org.apache.pulsar.client.admin.internal.NamespacesImpl.deleteNamespace(NamespacesImpl.java:226) at org.apache.pulsar.broker.namespace.NamespaceOwnershipListenerTests.testNamespaceBundleOwnershipListener(NamespaceOwnershipListenerTests.java:104) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132) at org.testng.internal.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:45) at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:73) at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:11) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) Suppressed: org.apache.pulsar.client.admin.PulsarAdminException$ConflictException: Cannot delete non empty bundle at org.apache.pulsar.client.admin.internal.BaseResource.getApiException(BaseResource.java:287) at org.apache.pulsar.client.admin.internal.BaseResource$4.failed(BaseResource.java:237) at org.glassfish.jersey.client.JerseyInvocation$1.failed(JerseyInvocation.java:882) at org.glassfish.jersey.client.JerseyInvocation$1.completed(JerseyInvocation.java:863) ``` ### Motivation same as https://github.com/apache/pulsar/pull/17070, there have race condition: - delete namespace bundle - asynchronously create topic `__change_event` ### Modifications - Make delete namespace after `__change_event` and `__change_event/__compaction` create finish. - As more as possible, change all the namespace deletion in test ### Documentation - [ ] `doc-required` (Your PR needs to update docs and you will update later) - [x] `doc-not-needed` (Please explain why) - [ ] `doc` (Your PR contains doc changes) - [ ] `doc-complete` (Docs have been already added) ### Matching PR in forked repository PR in forked repository: - https://github.com/poorbarcode/pulsar/pull/11 -- 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]
