From 1baecda33495a3e8a1a3b20a4f2a4a5a21cfa0b7 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 17 Mar 2026 22:43:24 -0700 Subject: [PATCH] Fix is_expired to use <= for SuperBlockSize check matching Go Go checks contentSize <= SuperBlockSize to detect empty volumes (no needles). Rust used < which would incorrectly allow a volume with exactly SuperBlockSize bytes (header only, no data) to proceed to the TTL expiry check and potentially be marked as expired. --- seaweed-volume/src/storage/volume.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seaweed-volume/src/storage/volume.rs b/seaweed-volume/src/storage/volume.rs index 75c17f745..972e110be 100644 --- a/seaweed-volume/src/storage/volume.rs +++ b/seaweed-volume/src/storage/volume.rs @@ -1645,7 +1645,7 @@ impl Volume { if volume_size_limit == 0 { return false; } - if volume_size < SUPER_BLOCK_SIZE as u64 { + if volume_size <= SUPER_BLOCK_SIZE as u64 { return false; } let ttl_minutes = self.super_block.ttl.minutes();