diff options
| author | chrislu <chris.lu@gmail.com> | 2022-08-22 14:12:23 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-08-22 14:12:23 -0700 |
| commit | 676e27c589a99691ba78f010a067898d89f764ac (patch) | |
| tree | cee659e16990e035b0f7a3c2ed994f1ea77cf9c2 /weed/shell/command_ec_common.go | |
| parent | 601ba5fb680eb028080160c857feda9b7044ab56 (diff) | |
| download | seaweedfs-676e27c589a99691ba78f010a067898d89f764ac.tar.xz seaweedfs-676e27c589a99691ba78f010a067898d89f764ac.zip | |
shell: stop long running jobs if lock is lost
Diffstat (limited to 'weed/shell/command_ec_common.go')
| -rw-r--r-- | weed/shell/command_ec_common.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/shell/command_ec_common.go b/weed/shell/command_ec_common.go index 5af783d04..0335e7e26 100644 --- a/weed/shell/command_ec_common.go +++ b/weed/shell/command_ec_common.go @@ -18,6 +18,10 @@ import ( func moveMountedShardToEcNode(commandEnv *CommandEnv, existingLocation *EcNode, collection string, vid needle.VolumeId, shardId erasure_coding.ShardId, destinationEcNode *EcNode, applyBalancing bool) (err error) { + if !commandEnv.isLocked() { + return fmt.Errorf("lock is lost") + } + copiedShardIds := []uint32{uint32(shardId)} if applyBalancing { |
