Bug description
Situation
The ShardMessageWithPermit has inner Vec for which size the _permit_bytes are taken.
Merging the batches in appends IggyMessages to the Vec without touching the _permit_bytes.
The loop drops on iteration and thereby frees the permit.
|
for msg in buffer.drain(..) { |
|
if let Some(last) = merged_batches.last_mut() |
|
&& Self::same_destination(&last.inner, &msg.inner) |
|
{ |
|
last.inner.messages.extend(msg.inner.messages); |
|
continue; |
|
} |
|
merged_batches.push(msg); |
|
} |
Consequence
The actual bytes in flight can exceed max_buffer_size and the BackpressureMode does not kick.
Affected area / component
Rust SDK
Deployment
None
Versions
No response
Hardware / environment
No response
Sample code
No response
Logs
No response
Iggy server config
No response
Reproduction
No response
Contribution
Good first issue
Bug description
Situation
The ShardMessageWithPermit has inner Vec for which size the _permit_bytes are taken.
Merging the batches in appends IggyMessages to the Vec without touching the _permit_bytes.
The loop drops on iteration and thereby frees the permit.
iggy/core/sdk/src/clients/producer_sharding.rs
Lines 227 to 235 in 3db955e
Consequence
The actual bytes in flight can exceed max_buffer_size and the BackpressureMode does not kick.
Affected area / component
Rust SDK
Deployment
None
Versions
No response
Hardware / environment
No response
Sample code
No response
Logs
No response
Iggy server config
No response
Reproduction
No response
Contribution
Good first issue