From fb03891cc61a696de01e6ef8362855cfcebe24c5 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 17 Mar 2026 11:36:15 -0700 Subject: [PATCH] Fix compilation: set_read_only_persist and set_writable return () These methods fire-and-forget save_vif internally, so gRPC callers should not try to chain .map_err() on the unit return type. --- seaweed-volume/src/server/grpc_server.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/seaweed-volume/src/server/grpc_server.rs b/seaweed-volume/src/server/grpc_server.rs index 26e2a89ec..f88ae6cf8 100644 --- a/seaweed-volume/src/server/grpc_server.rs +++ b/seaweed-volume/src/server/grpc_server.rs @@ -690,8 +690,7 @@ impl VolumeServer for VolumeGrpcService { let (_, vol) = store .find_volume_mut(vid) .ok_or_else(|| Status::not_found(format!("volume {} not found", vid)))?; - vol.set_read_only_persist(req.persist) - .map_err(|e| Status::internal(e.to_string()))?; + vol.set_read_only_persist(req.persist); } self.state.volume_state_notify.notify_one(); @@ -730,8 +729,7 @@ impl VolumeServer for VolumeGrpcService { let (_, vol) = store .find_volume_mut(vid) .ok_or_else(|| Status::not_found(format!("volume {} not found", vid)))?; - vol.set_writable() - .map_err(|e| Status::internal(e.to_string()))?; + vol.set_writable(); } self.state.volume_state_notify.notify_one();