Skip to content

Conversation

@BewareMyPower
Copy link
Contributor

See apache/pulsar-client-python#223

Motivation

Currently a shared buffer is used to store serialized message metadata for each send request. However, its capacity is only 64KB, when the metadata size exceeds 64KB, buffer overflow could happen.

Modifications

When the metadata size is too large, allocate a new buffer instead of using the shared buffer. Add testLargeProperties to cover it.

…ze exceeds 64KB

See apache/pulsar-client-python#223

### Motivation

Currently a shared buffer is used to store serialized message metadata
for each send request. However, its capacity is only 64KB, when the metadata
size exceeds 64KB, buffer overflow could happen.

### Modifications

When the metadata size is too large, allocate a new buffer instead of
using the shared buffer. Add `testLargeProperties` to cover it.
@BewareMyPower BewareMyPower self-assigned this Aug 29, 2024
@BewareMyPower BewareMyPower added the bug Something isn't working label Aug 29, 2024
@BewareMyPower BewareMyPower added this to the 3.6.0 milestone Aug 29, 2024
@shibd shibd merged commit 8f269e8 into apache:main Aug 29, 2024
shibd pushed a commit that referenced this pull request Aug 29, 2024
…ze exceeds 64KB (#443)

See apache/pulsar-client-python#223

### Motivation

Currently a shared buffer is used to store serialized message metadata
for each send request. However, its capacity is only 64KB, when the metadata
size exceeds 64KB, buffer overflow could happen.

### Modifications

When the metadata size is too large, allocate a new buffer instead of
using the shared buffer. Add `testLargeProperties` to cover it.

(cherry picked from commit 8f269e8)
@BewareMyPower BewareMyPower deleted the bewaremypower/property-size-limit branch August 29, 2024 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants