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] Fix flaky test ManagedLedgerTest.testGetNumberOfEntriesInStorage #22344

Merged

Conversation

poorbarcode
Copy link
Contributor

Motivation

Flaky test logs
https://github.com/apache/pulsar/actions/runs/8416664128/job/23064867159?pr=22283

Issue

  • After [fix][broker] Create new ledger after the current ledger is closed #22034, Managedledger will always create a new ledger after the previous closed
  • The test testGetNumberOfEntriesInStorage force set ML.state to LedgerOpened, which breaks the mechanism to guarantee no concurrent ledger switching. This leads to an unexpected empty ledgerInfo in the ledger list.
    • In expected, the ledgers should be [{id: 1, entries: 5}, {id: 2, entries: 5}, {id: 3, entries:0}]
    • Current behavior: [{id: 1, entries: 5}, {id: 2, entries: 5}, {id: 3, entries:0}, {id: 4, entries:0}]

Reproduce
You can reproduce the flaky test by running it about 10 times.

Modifications

Remove the unnecessary ledger switching.

Documentation

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

Matching PR in forked repository

PR in forked repository: x

@poorbarcode poorbarcode self-assigned this Mar 25, 2024
@poorbarcode poorbarcode added this to the 3.3.0 milestone Mar 25, 2024
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Mar 25, 2024
@poorbarcode poorbarcode reopened this Mar 25, 2024
@poorbarcode poorbarcode merged commit fc066d7 into apache:master Mar 27, 2024
71 of 73 checks passed
lhotari pushed a commit that referenced this pull request Mar 27, 2024
lhotari pushed a commit that referenced this pull request Mar 27, 2024
Technoboy- pushed a commit to Technoboy-/pulsar that referenced this pull request Apr 1, 2024
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Apr 15, 2024
…nStorage (apache#22344)

(cherry picked from commit fc066d7)
(cherry picked from commit 100a53b)
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Apr 17, 2024
…nStorage (apache#22344)

(cherry picked from commit fc066d7)
(cherry picked from commit 100a53b)
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Apr 17, 2024
…nStorage (apache#22344)

(cherry picked from commit fc066d7)
(cherry picked from commit 100a53b)
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Apr 19, 2024
…nStorage (apache#22344)

(cherry picked from commit fc066d7)
(cherry picked from commit 100a53b)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Apr 23, 2024
…nStorage (apache#22344)

(cherry picked from commit fc066d7)
(cherry picked from commit 100a53b)
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.

4 participants