We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92f8c0b commit 1503050Copy full SHA for 1503050
crates/fluss/src/record/arrow.rs
@@ -369,7 +369,11 @@ impl<'a> LogRecordsBatchs<'a> {
369
370
let batch_size_bytes =
371
LittleEndian::read_i32(self.data.get(self.current_pos + LENGTH_OFFSET..).unwrap());
372
- Some(batch_size_bytes as usize + LOG_OVERHEAD)
+ let batch_size = batch_size_bytes as usize + LOG_OVERHEAD;
373
+ if batch_size > self.remaining_bytes {
374
+ return None;
375
+ }
376
+ Some(batch_size)
377
}
378
379
0 commit comments