From 0c62d591e2081cc198110ee557acab773a034236 Mon Sep 17 00:00:00 2001 From: NyaMisty Date: Mon, 3 Jun 2024 05:16:05 +0800 Subject: [PATCH] Ignore remote volume when selecting volumes in operation (ec.encode/volume.tier.upload) (#5635) --- weed/shell/command_ec_encode.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/weed/shell/command_ec_encode.go b/weed/shell/command_ec_encode.go index c2b2074e4..16de2ce73 100644 --- a/weed/shell/command_ec_encode.go +++ b/weed/shell/command_ec_encode.go @@ -304,6 +304,10 @@ func collectVolumeIdsForEcEncode(commandEnv *CommandEnv, selectedCollection stri eachDataNode(topologyInfo, func(dc string, rack RackId, dn *master_pb.DataNodeInfo) { for _, diskInfo := range dn.DiskInfos { for _, v := range diskInfo.VolumeInfos { + // ignore remote volumes + if v.RemoteStorageName != "" && v.RemoteStorageKey != "" { + continue + } if v.Collection == selectedCollection && v.ModifiedAtSecond+quietSeconds < nowUnixSeconds { if float64(v.Size) > fullPercentage/100*float64(volumeSizeLimitMb)*1024*1024 { vidMap[v.Id] = true