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

[Enhancement] Make cursor caching eligibility logic reactive since reads don't get cached until checkCursorsToCacheEntries has been called #23503

Open
1 of 2 tasks
lhotari opened this issue Oct 23, 2024 · 0 comments
Assignees
Labels
type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages

Comments

@lhotari
Copy link
Member

lhotari commented Oct 23, 2024

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

Currently broker cache doesn't cache entries until checkCursorsToCacheEntries has been called. It get called as part of PulsarStats.updateStats which gets called every statsUpdateFrequencyInSecs (60s by default).
This could be a problem when a topic gets assigned to a broker and a large number of consumer connect in a large fanout scenario. The read request deduplication solution (PendingReadsManager added in #17241) will handle the problem for consumers at the same point of consumption, but caching would be useful for consumers that are not consuming exactly at the same location.

Solution

Improve the cursor caching eligibility logic to be reactive instead of calculated every 60s.

Alternatives

No response

Anything else?

discussion thread about broker cache design: https://lists.apache.org/thread/xm095hnjo0cffbdy8ckysmzzm90gsbnp
broker cache default tuning: #23466

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@lhotari lhotari added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Oct 23, 2024
@lhotari lhotari self-assigned this Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

No branches or pull requests

1 participant