mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-09-14 10:30:45 +02:00
shell: reset noLock in the admin script dispatcher too (#11059)
Three dispatchers reuse one CommandEnv: the interactive shell, the master's maintenance script runner, and the plugin worker's admin script handler. The first two were fixed; this is the third. It changes nothing today -- ForceNoLock already exempts this path -- so it is here to keep the rule the same everywhere rather than resting on that exemption staying in place.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user