Skip to content

Flaky-test: recoverLongTimeAfterMultipleWriteErrors #240

Closed

Description

@rdhabalia
Tests run: 219, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 81.903 sec <<< FAILURE! - in TestSuite
recoverLongTimeAfterMultipleWriteErrors(org.apache.bookkeeper.mledger.impl.ManagedLedgerErrorsTest)  Time elapsed: 0.014 sec  <<< FAILURE!
java.lang.AssertionError: expected [1] but found [2]
	at org.apache.bookkeeper.mledger.impl.ManagedLedgerErrorsTest.recoverLongTimeAfterMultipleWriteErrors(ManagedLedgerErrorsTest.java:470)
Results :
Failed tests: 
  ManagedLedgerErrorsTest.recoverLongTimeAfterMultipleWriteErrors:470 expected [1] but found [2]

Activity

  1. self-assigned this
    on Feb 24, 2017
  2. added this to the 1.17 milestone on Feb 24, 2017
  3. modified the milestones: 1.17, 1.18 on Mar 31, 2017
  4. modified the milestones: 1.18, on Jun 15, 2017
  5. 10 remaining items

  6. ivankelly commented on Sep 7, 2018

    @ivankelly
    Contributor

    I repro'd on a checkout from when this was reported, and it looks like a legit bug and potentially serious.
    However, I haven't been able to get a direct repro on master, though it looks like the bug still exists.

    The bug occurs as follows:

    • A managed ledger, with current ledger as 3
    • The managed ledger attempts to write two entries to 3
    • First entry write to 3 fails, 3 is closed, deleted, and replaced by 5 in the managed ledger, the writes are retried
    • Second entry write fails, 3 is closed, deleted from the ledger list (it's not there) and ledger 6 is created and added to the ledger list.

    The solution should be to make sure the ledgerClosed() checks whether the passed in ledger is the current ledger and only try to add a new one if so. However, I would like a reliable test for this first, but we'll need to modify the mocks first.

    (cc @merlimat )

  7. removed this from the 2.2.0-incubating milestone on Sep 12, 2018
  8. ivankelly commented on Sep 14, 2018

    @ivankelly
    Contributor

    Closed by #2573

  9. liangyepianzhou commented on Mar 7, 2023

    @liangyepianzhou
    Contributor

    It becomes a flaky test again.

    Example failure

    https://github.com/apache/pulsar/actions/runs/4329269822/jobs/7559697736

    Exception stacktrace

    Error:  recoverLongTimeAfterMultipleWriteErrors(org.apache.bookkeeper.mledger.impl.ManagedLedgerErrorsTest)  Time elapsed: 0.025 s  <<< FAILURE!
    java.lang.AssertionError: expected [null] but found [org.apache.bookkeeper.mledger.ManagedLedgerException$ManagedLedgerAlreadyClosedException: Waiting to recover from failure]
    	at org.testng.Assert.fail(Assert.java:99)
    	at org.testng.Assert.failNotSame(Assert.java:1033)
    	at org.testng.Assert.assertNull(Assert.java:965)
    	at org.testng.Assert.assertNull(Assert.java:953)
    	at org.apache.bookkeeper.mledger.impl.ManagedLedgerErrorsTest.recoverLongTimeAfterMultipleWriteErrors(ManagedLedgerErrorsTest.java:541)
    	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)
  10. changed the title [-]Intermittent test failures in ManagedLedgerErrorsTest.recoverLongTimeAfterMultipleWriteErrors[/-] [+]Flaky-test: recoverLongTimeAfterMultipleWriteErrors[/+] on Mar 7, 2023
  11. tisonkun commented on May 21, 2023

    @tisonkun
    Member

    Replace with a new issue so that we have better visibility #20364.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions