Browse Source

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.
rust-volume-server
Chris Lu 3 days ago
parent
commit
fb03891cc6
  1. 6
      seaweed-volume/src/server/grpc_server.rs

6
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();

Loading…
Cancel
Save