Skip to content

[improve][client] PIP-234: Support sharing the memory limit controller across multiple isolated Pulsar client instances#29

Closed
oneby-wang wants to merge 11 commits intomasterfrom
shared_memory_limit_controller
Closed

[improve][client] PIP-234: Support sharing the memory limit controller across multiple isolated Pulsar client instances#29
oneby-wang wants to merge 11 commits intomasterfrom
shared_memory_limit_controller

Conversation

@oneby-wang
Copy link
Copy Markdown
Owner

@oneby-wang oneby-wang commented Mar 3, 2026

Fixes apache#25212

Motivation

apache#19074 enables sharing of Pulsar client resources across multiple isolated Pulsar client instances, but this solution lacks limiting the total amount of memory across all of the Pulsar client instances. This PR introduces a shared MemoryLimitController solution for PIP-234.

Modifications

  1. Modify MemoryLimitController to support registering multiple trigger callbacks and deregistering the callback when the client instance gets closed.
  2. Add shared MemoryLimitController in PulsarClientSharedResources and PulsarClientSharedResourcesBuilder, then apply the shared MemoryLimitController to PulsarClientImplBuilder.
  3. Add tests to verify the code change.

Verifying this change

  • Make sure that the change passes the CI checks.

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

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

Matching PR in forked repository

PR in forked repository:

@oneby-wang oneby-wang force-pushed the shared_memory_limit_controller branch from 97bddcf to c029b7c Compare March 4, 2026 01:23
@oneby-wang oneby-wang force-pushed the shared_memory_limit_controller branch from 7fd4399 to 43296cf Compare March 28, 2026 04:02
@oneby-wang oneby-wang force-pushed the shared_memory_limit_controller branch from f5b95ee to ad11ba7 Compare April 4, 2026 12:01
@oneby-wang oneby-wang force-pushed the shared_memory_limit_controller branch from ec00a8f to 1f4a41f Compare April 7, 2026 10:34
@oneby-wang oneby-wang closed this Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] PIP-234: Add a solution to share the memory limit controller solution

1 participant