-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Entry duplicated in pulsar when bookie failed and zookeeper disconnected #7490
Labels
Comments
Forgot to attach test case assertion message for kezhuw@bc0de5e, here it is: java.lang.AssertionError: The following asserts failed:
unexpected last entry id expected [9] but found [10],
unexpected last add confirmed expected [9] but found [10],
unexpected sequence id expected [12] but found [11],
unexpected message content expected [foo-12] but found [foo-11],
unexpected sequence id expected [13] but found [12],
unexpected message content expected [foo-13] but found [foo-12]
<Click to see difference>
at org.testng.asserts.SoftAssert.assertAll(SoftAssert.java:43)
at org.apache.pulsar.client.api.ClientDeduplicationFailureTest.testClientDeduplicationWithBkFailureAndZkDisconnected(ClientDeduplicationFailureTest.java:593)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:583)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:719)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:989)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at org.testng.TestRunner.privateRun(TestRunner.java:648)
at org.testng.TestRunner.run(TestRunner.java:505)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
at org.testng.SuiteRunner.run(SuiteRunner.java:364)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
at org.testng.TestNG.runSuites(TestNG.java:1049)
at org.testng.TestNG.run(TestNG.java:1017)
at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:110)
|
Closed as stale. Please create a new issue if it's still relevant to the maintained versions. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When adding new entry, bookie failure and zookeeper disconnection may cause inconsistency between
LedgerInfo.getEntries
andLedgerMetadata.getLastEntryId
. This will introduce duplicated entry.To Reproduce
entry-a
toledger1
.ledgerClosed
toManagedLedger
.ledger2
,entry-a
added success.ManagedLedger
does not countentry-a
inLedgerInfo.getEntries
, butentry-a
does count asLedgerMetadata.getLastEntryId
andLedgerHandle.getLastAddConfirmed
after recovery.ManagedCursor
does not useLedgerInfo.getEntries
to restrict its reading.LedgerOffloader
does not useLedgerInfo.getEntries
either.I have add test case to reproduce this: kezhuw@bc0de5e.
Strictly speaking, I think
OpAddEntry.handleAddTimeoutFailure
has this issue too.The text was updated successfully, but these errors were encountered: