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

Use PulsarByteBufAllocator to allocate buffer for chunks #13536

Merged

Conversation

BewareMyPower
Copy link
Contributor

Motivation

Currently Pulsar consumer allocates memory from direct memory via Unpooled.directBuffer directly, which doesn't make use of the widely used allocator in Pulsar.

Modifications

Use PulsarByteBufAllocator as the memory allocator for chunks buffer.

Verifying this change

  • Make sure that the change passes the CI checks.

This change is a trivial rework / code cleanup without any test coverage.

@BewareMyPower BewareMyPower added type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages area/client doc-not-needed Your PR changes do not impact docs release/2.8.3 release/2.9.2 labels Dec 28, 2021
@BewareMyPower BewareMyPower added this to the 2.10.0 milestone Dec 28, 2021
@BewareMyPower BewareMyPower self-assigned this Dec 28, 2021
@BewareMyPower BewareMyPower merged commit a5d3473 into apache:master Dec 28, 2021
@BewareMyPower BewareMyPower deleted the bewaremypower/chunk-buf-allocator branch December 28, 2021 12:35
codelipenghui pushed a commit that referenced this pull request Dec 30, 2021
…side (#13536)

### Motivation

Currently Pulsar consumer allocates memory from direct memory via `Unpooled.directBuffer` directly, which doesn't make use of the widely used allocator in Pulsar.

### Modifications

Use `PulsarByteBufAllocator` as the memory allocator for chunks buffer.

(cherry picked from commit a5d3473)
(cherry picked from commit ddd1f5eb3dfb98b462a42121027cd5b51ed6218b)
@codelipenghui codelipenghui added the cherry-picked/branch-2.9 Archived: 2.9 is end of life label Dec 30, 2021
codelipenghui pushed a commit that referenced this pull request Dec 30, 2021
…side (#13536)

### Motivation

Currently Pulsar consumer allocates memory from direct memory via `Unpooled.directBuffer` directly, which doesn't make use of the widely used allocator in Pulsar.

### Modifications

Use `PulsarByteBufAllocator` as the memory allocator for chunks buffer.

(cherry picked from commit a5d3473)
@codelipenghui codelipenghui added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Dec 30, 2021
wuzhanpeng pushed a commit to wuzhanpeng/pulsar that referenced this pull request Jan 5, 2022
…side (apache#13536)

### Motivation

Currently Pulsar consumer allocates memory from direct memory via `Unpooled.directBuffer` directly, which doesn't make use of the widely used allocator in Pulsar.

### Modifications

Use `PulsarByteBufAllocator` as the memory allocator for chunks buffer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/client cherry-picked/branch-2.8 Archived: 2.8 is end of life cherry-picked/branch-2.9 Archived: 2.9 is end of life doc-not-needed Your PR changes do not impact docs release/2.8.3 release/2.9.2 type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants