Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

volume server: drop the unused unmount result in VolumeCopy validation, and test-only EC helpers (#11531)

Eliah Rusin5ece8dd63c38
diff --git a/seaweed-volume/src/server/grpc_server.rs b/seaweed-volume/src/server/grpc_server.rs
index 7d36c04439..1e98ec4620 100644
--- a/seaweed-volume/src/server/grpc_server.rs
+++ b/seaweed-volume/src/server/grpc_server.rs
@@ -5683,7 +5683,8 @@ impl VolumeCopyJob {
v.deleted_count() as u64,
)
{
- store.unmount_volume(vid);
+ // Cannot fail: mounted under this same guard, so it cannot be compacting.
+ let _ = store.unmount_volume(vid);
return Err(Status::internal(format!(
"failed to mount or validate volume {}: {}",
vid, e
diff --git a/seaweed-volume/src/storage/store.rs b/seaweed-volume/src/storage/store.rs
index 29d254aa9b..8be0fa6b81 100644
--- a/seaweed-volume/src/storage/store.rs
+++ b/seaweed-volume/src/storage/store.rs
@@ -1216,6 +1216,7 @@ impl Store {
found_vol.map(|v| (v, dirs))
}
+ #[cfg(test)]
pub fn delete_expired_ec_volumes(
&mut self,
) -> (
@@ -1301,6 +1302,7 @@ impl Store {
}
/// Remove an EC volume from whichever location has it.
+ #[cfg(test)]
pub fn remove_ec_volume(&mut self, vid: VolumeId) -> Option<EcVolume> {
for loc in &mut self.locations {
if let Some(ecv) = loc.remove_ec_volume(vid) {