skip not found error on deletion

This commit is contained in:
Chris Lu 2021-08-06 19:35:47 -07:00
parent 8828f485c0
commit 0c0f77e2ae

View file

@ -8,6 +8,7 @@ import (
"github.com/chrislusf/seaweedfs/weed/wdclient"
"io"
"path/filepath"
"strings"
"time"
"github.com/chrislusf/seaweedfs/weed/storage/needle"
@ -136,7 +137,9 @@ func doVolumeTierMove(commandEnv *CommandEnv, writer io.Writer, vid needle.Volum
for _, loc := range locations {
if loc.Url != dst.dataNode.Id {
if err = deleteVolume(commandEnv.option.GrpcDialOption, vid, loc.Url); err != nil {
fmt.Fprintf(writer, "failed to delete volume %d on %s: %v\n", vid, loc.Url, err)
if !strings.Contains(err.Error(), "not found") {
fmt.Fprintf(writer, "failed to delete volume %d on %s: %v\n", vid, loc.Url, err)
}
}
}
}