From 7bf2595ea889e3208923424df6d29ad8c473de22 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 17 Mar 2026 01:13:36 -0700 Subject: [PATCH] Match Go read_super_block: apply replication override from .vif --- seaweed-volume/src/storage/volume.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/seaweed-volume/src/storage/volume.rs b/seaweed-volume/src/storage/volume.rs index e2226e1b9..424493731 100644 --- a/seaweed-volume/src/storage/volume.rs +++ b/seaweed-volume/src/storage/volume.rs @@ -912,6 +912,14 @@ impl Volume { } self.super_block = SuperBlock::from_bytes(&full_buf)?; + + // Match Go: if volumeInfo.Replication is set, override super block's ReplicaPlacement + if !self.volume_info.replication.is_empty() { + if let Ok(rp) = ReplicaPlacement::from_string(&self.volume_info.replication) { + self.super_block.replica_placement = rp; + } + } + Ok(()) }