mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-07 02:04:21 +01:00
core/mvcc/logical-log: drain consumed bytes on read_more_data
This commit is contained in:
@@ -413,6 +413,10 @@ impl StreamingLogicalLogReader {
|
||||
let c = self.file.pread(self.offset as u64, c)?;
|
||||
io.wait_for_completion(c)?;
|
||||
self.offset += to_read;
|
||||
// cleanup consumed bytes
|
||||
// this could be better for sure
|
||||
let _ = self.buffer.borrow_mut().drain(0..self.buffer_offset);
|
||||
self.buffer_offset = 0;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user