poorbarcode opened a new pull request, #22344: URL: https://github.com/apache/pulsar/pull/22344
### Motivation **Flaky test logs** https://github.com/apache/pulsar/actions/runs/8416664128/job/23064867159?pr=22283 **Issue** - After https://github.com/apache/pulsar/pull/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 <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. --> - [ ] `doc` <!-- Your PR contains doc changes. --> - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later --> - [x] `doc-not-needed` <!-- Your PR changes do not impact docs --> - [ ] `doc-complete` <!-- Docs have been already added --> ### Matching PR in forked repository PR in forked repository: x -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org