Browse Source

Call store.close() on shutdown matching Go's Shutdown()

Go's Shutdown() calls vs.store.Close() which closes all volumes
and flushes file handles. The Rust server was relying on process
exit for cleanup, which could leave data unflushed.
rust-volume-server
Chris Lu 2 days ago
parent
commit
43d30c3d95
  1. 3
      seaweed-volume/src/main.rs

3
seaweed-volume/src/main.rs

@ -747,6 +747,9 @@ async fn run(
let _ = h.await;
}
// Close all volumes (flush and release file handles) matching Go's Shutdown()
state.store.write().unwrap().close();
if let Some(cpu_profile) = cpu_profile {
cpu_profile.finish().map_err(std::io::Error::other)?;
}

Loading…
Cancel
Save