lhotari opened a new pull request, #25177: URL: https://github.com/apache/pulsar/pull/25177
Fixes #25174 ### Motivation An NoSuchElementException could occur in EntryCountEstimator, causing dispatching to stop. This condition could happen as a result of a race condition caused by ledger trimming. The ledgersInfo map appear to be be empty. ### Modifications - check if ledgersInfo map is empty - catch NoSuchElementException when firstKey or lastKey is accessed to avoid race conditions after checking if the map was empty - add tests ### 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 --> -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
