Compare commits

..
Author SHA1 Message Date
github-actions[bot] 79b8720213 4.45 2026-08-31 23:21:01 +00:00
Chris LuandGitHub 0f4a7d0803 shell: keep noLock to the command that set it (#11052)
noLock says "this invocation changes nothing" -- volume.balance, volume.move,
volume.copy, volume.merge and volume.fix.replication all set it for a dry run,
and none clears it. The CommandEnv is created once and reused by both
dispatchers, the interactive shell and the master's maintenance script runner,
so a simulation left every later command unlocked:

    volume.balance -noLock          # changes nothing
    volume.move ...                 # mutates, and skips its lock

Reset before dispatch in both, where the invocation begins. forceNoLock is
untouched: that is set once, deliberately, for a trusted path.
2026-08-31 11:36:23 -07:00
3 changed files with 3 additions and 8 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
apiVersion: v1
description: SeaweedFS
name: seaweedfs
appVersion: "4.44"
appVersion: "4.45"
# Dev note: Trigger a helm chart release by `git tag -a helm-<version>`
version: 4.44.0
version: 4.45.0
@@ -290,11 +290,6 @@ 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)
+1 -1
View File
@@ -9,7 +9,7 @@ import (
var (
MAJOR_VERSION = int32(4)
MINOR_VERSION = int32(44)
MINOR_VERSION = int32(45)
VERSION_NUMBER = fmt.Sprintf("%d.%02d", MAJOR_VERSION, MINOR_VERSION)
VERSION = util.SizeLimit + " " + VERSION_NUMBER
COMMIT = ""