Skip to content
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

[fix][test] Flaky-test: testMessageExpiryWithTimestampNonRecoverableException and testIncorrectClientClock #22489

Merged
merged 3 commits into from
Apr 15, 2024

Conversation

shibd
Copy link
Member

@shibd shibd commented Apr 12, 2024

Motivation

#22351
#22432

After #22034, the calculation method for the ledger number should be: totalEntries / entriesPerLedger + 1, However, since the creation of the ledger is asynchronous, sometimes the last ledger is not created before the function returns.

// Use the executor here is to avoid use the Zookeeper thread to create the ledger which will lead
// to deadlock at the zookeeper client, details to see https://github.com/apache/pulsar/issues/13736
this.executor.execute(() ->
asyncCreateLedger(bookKeeper, config, digestType, this, Collections.emptyMap()));

Modifications

  • Add retryStrategically((test) -> ledger.getState() == ManagedLedgerImpl.State.LedgerOpened,10, 200) to make sure last ledger creates success.
  • Modify the ledger quantity and assertions related to makePosition.

Verifying this change

  • After running it 100 times locally, this test is stable.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

@shibd shibd self-assigned this Apr 12, 2024
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Apr 12, 2024
@shibd shibd requested a review from lhotari April 12, 2024 10:29
@codelipenghui
Copy link
Contributor

/pulsarbot run-failure-checks

@shibd shibd changed the title [fix][test] Flaky-test: PersistentMessageFinderTest.testMessageExpiryWithTimestampNonRecoverableException [fix][test] Flaky-test: testMessageExpiryWithTimestampNonRecoverableException and testIncorrectClientClock Apr 15, 2024
@Technoboy- Technoboy- added this to the 3.3.0 milestone Apr 15, 2024
@Technoboy- Technoboy- merged commit d9a43dd into apache:master Apr 15, 2024
52 of 53 checks passed
shibd added a commit that referenced this pull request Apr 15, 2024
…xception and testIncorrectClientClock (#22489)

(cherry picked from commit d9a43dd)
shibd added a commit that referenced this pull request Apr 15, 2024
…xception and testIncorrectClientClock (#22489)

(cherry picked from commit d9a43dd)
shibd added a commit that referenced this pull request Apr 15, 2024
…xception and testIncorrectClientClock (#22489)

(cherry picked from commit d9a43dd)
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Apr 16, 2024
…xception and testIncorrectClientClock (apache#22489)

(cherry picked from commit d9a43dd)
(cherry picked from commit c590198)
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Apr 17, 2024
…xception and testIncorrectClientClock (apache#22489)

(cherry picked from commit d9a43dd)
(cherry picked from commit c590198)
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Apr 17, 2024
…xception and testIncorrectClientClock (apache#22489)

(cherry picked from commit d9a43dd)
(cherry picked from commit c590198)
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Apr 19, 2024
…xception and testIncorrectClientClock (apache#22489)

(cherry picked from commit d9a43dd)
(cherry picked from commit c590198)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Apr 23, 2024
…xception and testIncorrectClientClock (apache#22489)

(cherry picked from commit d9a43dd)
(cherry picked from commit c590198)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants