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.

[shell] don't require lock when there are no changes for volume.fix.replication (#6266)

Konstantin Lebedeva143c888e53d
diff --git a/weed/shell/command_volume_fix_replication.go b/weed/shell/command_volume_fix_replication.go
index 40bc07fcee..61c4ac990b 100644
--- a/weed/shell/command_volume_fix_replication.go
+++ b/weed/shell/command_volume_fix_replication.go
@@ -73,12 +73,13 @@ func (c *commandVolumeFixReplication) Do(args []string, commandEnv *CommandEnv,
return nil
}
- if err = commandEnv.confirmIsLocked(args); err != nil {
+ commandEnv.noLock = *skipChange
+ takeAction := !*skipChange
+
+ if err = commandEnv.confirmIsLocked(args); takeAction && err != nil {
return
}
- takeAction := !*skipChange
-
underReplicatedVolumeIdsCount := 1
for underReplicatedVolumeIdsCount > 0 {
fixedVolumeReplicas := map[string]int{}