-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[PIP-74] Support consumer client memory limit #15216
Conversation
/pulsarbot run-failure-checks |
1 similar comment
/pulsarbot run-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.
Do we need to introduce a publish/consume memory ratio? In most cases, users are consuming messages from the consumer and publish new messages, and ack the consumed messages. I'm worried about if the consumer can use up the memory, the producer not able to publish, so that the consumer queue can't be cleanup, it looks like a deadlock.
Yes, good point. Sharing memory quota does have this kind of isolation problem. Not only between producers and consumers, but also between different consumers. E.g. one consumer use up the memory, other consumers may not be able to receive any message any more. Currently, I suggest to enable this feature within a new client instance. I am not sure it's the right time to just split publish/consume memory quota, by ratio or other ways. One alternative is to reduce local message buffer directly and make broker resend message later. This may require some change in protocols. Just a brief thought yet. Let's dig deeper in anther PIP(like solving isolation problem when sharing producers and consumers in one client instance). |
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.
Overall LGTM. left one comment.
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MemoryLimitController.java
Show resolved
Hide resolved
Hi @Jason918, I find this discussion from apache/pulsar-client-go#927. Just some question I want to figure out. |
Great question @Gleiphir2769. If you don't get an answer, it might help to post this on the pulsar dev mailing list. |
Good suggestion @michaeljmarshall ! I will start a discussion on the dev mailing list. |
@Gleiphir2769 I have replied in the mail list. :) |
Motivation
This is the final part of PIP-74.
https://github.com/apache/pulsar/wiki/PIP-74%3A-Pulsar-client-memory-limits
Modifications
autoScaledReceiverQueueSizeEnabled
is enabled. We can change this to default when this feature is verified by more production usage.Verifying this change
(Please pick either of the following options)
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation
Check the box below and label this PR (if you have committer privilege).
Need to update docs?
no-need-doc