Skip to content

Conversation

@lhotari
Copy link
Member

@lhotari lhotari commented Oct 17, 2025

Motivation

AbstractMetadataStore contains an unbounded childrenCache which might consume a lot of heap memory when a lot of namespaces with a lot of topics are listed. The cache has a timeout of 10 minutes so the memory usage problem is limited to certain use cases. For example, when all topics are listed for all namespaces in less than 10 minutes when there are a lot of namespaces and topics.

Modifications

Add a limit to the childrenCache so that oldest entries start to get expired when the cache consumes more than 20% of the maximum heap size.

Tests are TBD.

Documentation

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

@lhotari lhotari added this to the 4.2.0 milestone Oct 17, 2025
@lhotari lhotari self-assigned this Oct 17, 2025
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Oct 17, 2025
Copy link
Member

@dao-jun dao-jun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lhotari
Copy link
Member Author

lhotari commented Oct 29, 2025

/pulsarbot rerun-failure-checks

@lhotari lhotari merged commit 909efec into apache:master Dec 4, 2025
95 of 98 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs ready-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants