[Broker, Functions, Websocket] Disable memory limit controller in internal Pulsar clients #15752
+20
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
There's a performance regression with the memory limit change "PIP-120: Enable client memory limit by default", #13306 . PR was #13344 .
It's better to default to the previous setting of disabling memory limits for internal Pulsar clients so that the performance profile doesn't change because of the memory limit.
Modifications
Set
.memoryLimit(0, SizeUnit.BYTES)for PulsarClient builders of the internal Pulsar clients.Additional context
#15723 restores the default
maxPendingMessages&maxPendingMessagesAcrossPartitionslimits for producers to the defaults used before PIP-120 changes when the memory limit is disabled. That might be necessary in some cases for restoring the pre-PIP-120 behavior. It also disables the memory limit for the broker client and replication clients.#15748 handles disabling memory limits for CLI tools such as pulsar-perf.