From 8528f92248cfe1b1d6066d45ffd49c026fd85725 Mon Sep 17 00:00:00 2001 From: Pere Diaz Bou Date: Thu, 25 Sep 2025 12:39:48 +0200 Subject: [PATCH] core/mvcc/logical-log: fix is_eof --- core/mvcc/persistent_storage/logical_log.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/mvcc/persistent_storage/logical_log.rs b/core/mvcc/persistent_storage/logical_log.rs index a782c54ab..e10489c0e 100644 --- a/core/mvcc/persistent_storage/logical_log.rs +++ b/core/mvcc/persistent_storage/logical_log.rs @@ -349,7 +349,8 @@ impl StreamingLogicalLogReader { } pub fn is_eof(&self) -> bool { - self.offset >= self.file_size + // if we are positioned at the end of file and we have consumed all bytes + self.offset >= self.file_size && self.bytes_can_read() == 0 } fn consume_u8(&mut self, io: &Arc) -> Result {