shell: stop long running jobs if lock is lost

This commit is contained in:
chrislu
2022-08-22 14:12:23 -07:00
parent 601ba5fb68
commit 676e27c589
7 changed files with 29 additions and 0 deletions

View File

@@ -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 {