Browse Source

fix set_writable to not modify no_write_can_delete

Go's MarkVolumeWritable only sets noWriteOrDelete=false and persists.
Rust was additionally setting no_write_can_delete=has_remote_file,
which could incorrectly change the write mode for remote-file volumes
when the master explicitly asks to make the volume writable.
pull/8539/head
Chris Lu 2 weeks ago
parent
commit
b5d6334309
  1. 1
      seaweed-volume/src/storage/volume.rs

1
seaweed-volume/src/storage/volume.rs

@ -2070,7 +2070,6 @@ impl Volume {
/// Mark this volume as writable (allow writes and deletes).
pub fn set_writable(&mut self) -> Result<(), VolumeError> {
self.no_write_or_delete = false;
self.no_write_can_delete = self.has_remote_file;
self.save_vif()
}

Loading…
Cancel
Save