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: reset noLock in the admin script dispatcher too (#11059)

Chris Lu8873f9775c5d
diff --git a/weed/plugin/worker/admin_script_handler.go b/weed/plugin/worker/admin_script_handler.go
index 5643956d02..d6ff69cca9 100644
--- a/weed/plugin/worker/admin_script_handler.go
+++ b/weed/plugin/worker/admin_script_handler.go
@@ -290,6 +290,11 @@ func (h *AdminScriptHandler) Execute(ctx context.Context, request *plugin_pb.Exe
continue
}
found = true
+ // The env is reused for every command in the script, and noLock
+ // belongs to the invocation that set it. ForceNoLock already exempts
+ // this path, so this changes nothing today -- it keeps the rule the
+ // same in all three dispatchers rather than resting on that.
+ commandEnv.SetNoLock(false)
if err := command.Do(cmd.Args, commandEnv, output); err != nil {
msg := fmt.Sprintf("%s: %v", cmd.Name, err)
errorMessages = append(errorMessages, msg)