-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][proxy]Pulsar Proxy OOMs because it forgets to clear the topic name cache #24458
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
[fix][proxy]Pulsar Proxy OOMs because it forgets to clear the topic name cache #24458
Conversation
/pulsarbot rerun-failure-checks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a competing PR to fix the issue. I've already submitted #24457 and provided my argumentation in #24457 (comment) .
pulsar-common/src/main/java/org/apache/pulsar/common/naming/TopicName.java
Show resolved
Hide resolved
Unblocking this PR since we can come back to the #24457 while optimizing topic pattern related memory usage. String deduplication is mostly relevant for those use cases.
Yes, let's first solve the problem with the original plan, and then discuss the rationality of the optimization Thanks ❤️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please hold this PR for some time. I'm working on a better solution motivated by my PR today: #24463
I will push it ASAP.
@lhotari @poorbarcode @coderzc I pushed a new solution that:
PTAL #24465 |
I have a question, under what scenario will evictCacheByScheduledTask be false? I see you set it to true in BrokerService、WebSocketService and ProxyService |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though it's already the same behavior as broker is, I'm wondering how can it address the following case?
LOOP:
Create a topic with a random name
Do some send and receive
Delete this topic
The cache could easily be very large and cause OOM.
I believe the broker has the same issue as well.
Close the PR |
Fixes #24445
Main Issue: #24445
Motivation
PR #23052 fixed the issue caused by creating TopicName and adding items into the queue of TopicName Cache.
Issue: PR added a clarification for Pulsar Broker, but forgot to add the clarification for Pulsar Proxy, Pulsar WebSocket Service, and Pulsar Client.
Modifications
10_000
, which is the same value as the original behavior before [improve] [broker] Improve CPU resources usege of TopicName Cache #23052Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: x