Browse Source

Include deleted needles in scan_raw_needles_from to match Go

Go's ScanVolumeFileFrom visits ALL needles including deleted ones.
Skipping deleted entries during incremental copy would cause tombstones
to not be propagated, making deleted files reappear on the receiving side.
rust-volume-server
Chris Lu 3 days ago
parent
commit
4fe3df6b1d
  1. 6
      seaweed-volume/src/storage/volume.rs

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

@ -1999,10 +1999,8 @@ impl Volume {
let body_length = needle::needle_body_length(size, version);
let total_size = NEEDLE_HEADER_SIZE as u64 + body_length as u64;
if size.is_deleted() || size.0 <= 0 {
offset += total_size;
continue;
}
// Match Go's ScanVolumeFileFrom: visit ALL needles including deleted ones.
// This is critical for incremental copy where tombstones must be propagated.
// Read body bytes
let mut body = vec![0u8; body_length as usize];

Loading…
Cancel
Save