You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Tests run: 46, Failures: 1, Errors: 0, Skipped: 19, Time elapsed: 204.45 s <<< FAILURE! - in org.apache.pulsar.client.api.KeySharedSubscriptionTest
Error: testRemoveFirstConsumer(org.apache.pulsar.client.api.KeySharedSubscriptionTest) Time elapsed: 0.228 s <<< FAILURE!
java.lang.AssertionError: expected [0] but found [10]
at org.testng.Assert.fail(Assert.java:99)
at org.testng.Assert.failNotEquals(Assert.java:1037)
at org.testng.Assert.assertEqualsImpl(Assert.java:140)
at org.testng.Assert.assertEquals(Assert.java:122)
at org.testng.Assert.assertEquals(Assert.java:907)
at org.testng.Assert.assertEquals(Assert.java:917)
at org.apache.pulsar.client.api.KeySharedSubscriptionTest.testRemoveFirstConsumer(KeySharedSubscriptionTest.java:685)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
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:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Error: Tests run: 50, Failures: 1, Errors: 0, Skipped: 23, Time elapsed: 221.229 s <<< FAILURE! - in org.apache.pulsar.client.api.KeySharedSubscriptionTest
Error: testRemoveFirstConsumer(org.apache.pulsar.client.api.KeySharedSubscriptionTest) Time elapsed: 0.314 s <<< FAILURE!
java.lang.AssertionError: expected [0] but found [10]
at org.testng.Assert.fail(Assert.java:99)
at org.testng.Assert.failNotEquals(Assert.java:1037)
at org.testng.Assert.assertEqualsImpl(Assert.java:140)
at org.testng.Assert.assertEquals(Assert.java:122)
at org.testng.Assert.assertEquals(Assert.java:907)
at org.testng.Assert.assertEquals(Assert.java:917)
at org.apache.pulsar.client.api.KeySharedSubscriptionTest.testRemoveFirstConsumer(KeySharedSubscriptionTest.java:698)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
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:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
I have located this issue, and the test case is actually ok, but it caused by a race condition in PersistentDispatcherMultipleConsumers, which indeed would causing the unordered consuming.
One can reproduce it easily in local environment by changing the 100ms to 1ms here.
Activity
lhotari commentedon Nov 17, 2021
@Jason918 The problem isn't resolved. I'm reopening this issue. Here's a recent failure: https://github.com/apache/pulsar/runs/4236580815?check_suite_focus=true#step:9:3246 . It's a test run for PR #12853 and it included your attempt #12807 to fix the flaky test.
Jason918 commentedon Nov 17, 2021
Yes, I got reproduced locally. And I got a detailed DEBUG log. I will keep look into this.
Jason918 commentedon Nov 17, 2021
testRemoveFirstConsumer.log
Debug level log here.
Anyone familiar with KeyShare consuming mode could help.
Jason918 commentedon Nov 18, 2021
I have located this issue, and the test case is actually ok, but it caused by a race condition in
PersistentDispatcherMultipleConsumers, which indeed would causing the unordered consuming.One can reproduce it easily in local environment by changing the 100ms to 1ms here.
pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumers.java
Line 294 in 5523604
I would like submit an issue with detailed explanation about this.
codelipenghui commentedon Mar 4, 2022
The issue had no activity for 30 days, mark with Stale label.
Jason918 commentedon Mar 4, 2022
It's fixed by #12890.