Browse Source

Fix is_expired volume_size comparison to use < matching Go

Go checks `volumeSize < super_block.SuperBlockSize` (strict less-than),
but Rust used `<=`. This meant Rust would fail to expire a volume that
is exactly SUPER_BLOCK_SIZE bytes.
rust-volume-server
Chris Lu 5 days ago
parent
commit
94606c612b
  1. 2
      seaweed-volume/src/storage/volume.rs

2
seaweed-volume/src/storage/volume.rs

@ -1645,7 +1645,7 @@ impl Volume {
if volume_size_limit == 0 { if volume_size_limit == 0 {
return false; return false;
} }
if volume_size <= SUPER_BLOCK_SIZE as u64 {
if volume_size < SUPER_BLOCK_SIZE as u64 {
return false; return false;
} }
let ttl_minutes = self.super_block.ttl.minutes(); let ttl_minutes = self.super_block.ttl.minutes();

Loading…
Cancel
Save