Skip to content

Conversation

@lhotari
Copy link
Member

@lhotari lhotari commented Jan 22, 2026

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

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

@lhotari lhotari added this to the 4.2.0 milestone Jan 22, 2026
@lhotari lhotari self-assigned this Jan 22, 2026
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Jan 22, 2026
@lhotari lhotari added release/3.0.16 release/4.0.9 release/4.1.3 and removed doc-not-needed Your PR changes do not impact docs labels Jan 22, 2026
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Jan 22, 2026
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.

[Bug][Broker] Escaped NoSuchElementException exception throw in EntryCountEstimator causes dispatcher to stop dispatching messages

2 participants