Skip to content

Commit 5fbbc8a

Browse files
committed
fix s2_output buffer size limit to respect S2 1MB per-record constraint
1 parent 832fddd commit 5fbbc8a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/adapters/src/transport/s2/output.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ impl OutputEndpoint for S2OutputEndpoint {
9292
}
9393

9494
fn max_buffer_size_bytes(&self) -> usize {
95-
usize::MAX
95+
// S2 enforces a 1MB limit per AppendRecord.
96+
// Use a conservative limit to leave room for framing overhead.
97+
1_000_000
9698
}
9799

98100
fn push_buffer(&mut self, buffer: &[u8]) -> AnyResult<()> {

0 commit comments

Comments
 (0)