diff --git a/seaweed-volume/src/storage/erasure_coding/ec_volume.rs b/seaweed-volume/src/storage/erasure_coding/ec_volume.rs index c8a9bb60e..fa94e899e 100644 --- a/seaweed-volume/src/storage/erasure_coding/ec_volume.rs +++ b/seaweed-volume/src/storage/erasure_coding/ec_volume.rs @@ -448,8 +448,10 @@ impl EcVolume { ecx_file.read_exact_at(&mut entry_buf, file_offset)?; } let (_key, _offset, size) = idx_entry_from_bytes(&entry_buf); - // Raw size includes the sign bit; match Go's size.Raw() which is uint32 - total_size += size.0.unsigned_abs() as u64; + // Match Go's Size.Raw(): tombstone (-1) returns 0, other negatives return abs + if !size.is_tombstone() { + total_size += size.0.unsigned_abs() as u64; + } if size.is_deleted() { files_deleted += 1; } else {