diff --git a/seaweed-volume/src/storage/erasure_coding/ec_volume.rs b/seaweed-volume/src/storage/erasure_coding/ec_volume.rs index a746beca3..ff3973f20 100644 --- a/seaweed-volume/src/storage/erasure_coding/ec_volume.rs +++ b/seaweed-volume/src/storage/erasure_coding/ec_volume.rs @@ -178,11 +178,15 @@ impl EcVolume { format!("{}.ecj", self.idx_base_name()) } - /// Sync the EC volume's journal file to disk (matching Go's ecv.SyncToDisk()). + /// Sync the EC volume's journal and index files to disk (matching Go's ecv.Sync()). + /// Go flushes both .ecj and .ecx to ensure in-place deletion marks are persisted. pub fn sync_to_disk(&self) -> io::Result<()> { if let Some(ref ecj_file) = self.ecj_file { ecj_file.sync_all()?; } + if let Some(ref ecx_file) = self.ecx_file { + ecx_file.sync_all()?; + } Ok(()) }