From e9033136aacaa9619846ab780a975fee31ec4f25 Mon Sep 17 00:00:00 2001 From: chrislu Date: Sun, 10 Aug 2025 14:24:59 -0700 Subject: [PATCH] todo --- weed/shell/command_ec_common.go | 1 + weed/shell/command_ec_decode.go | 1 + weed/shell/command_ec_rebuild.go | 1 + 3 files changed, 3 insertions(+) diff --git a/weed/shell/command_ec_common.go b/weed/shell/command_ec_common.go index 2ed4dd354..599ec048b 100644 --- a/weed/shell/command_ec_common.go +++ b/weed/shell/command_ec_common.go @@ -288,6 +288,7 @@ func oneServerCopyAndMountEcShardsFromSource(grpcDialOption grpc.DialOption, CopyEcjFile: true, CopyVifFile: true, SourceDataNode: string(existingLocation), + Generation: 0, // shell commands operate on existing (generation 0) volumes }) if copyErr != nil { return fmt.Errorf("copy %d.%v %s => %s : %v\n", volumeId, shardIdsToCopy, existingLocation, targetServer.info.Id, copyErr) diff --git a/weed/shell/command_ec_decode.go b/weed/shell/command_ec_decode.go index 673a9a4f2..63972dfa3 100644 --- a/weed/shell/command_ec_decode.go +++ b/weed/shell/command_ec_decode.go @@ -196,6 +196,7 @@ func collectEcShards(commandEnv *CommandEnv, nodeToEcIndexBits map[pb.ServerAddr CopyEcjFile: true, CopyVifFile: true, SourceDataNode: string(loc), + Generation: 0, // shell commands operate on existing (generation 0) volumes }) if copyErr != nil { return fmt.Errorf("copy %d.%v %s => %s : %v\n", vid, needToCopyEcIndexBits.ShardIds(), loc, targetNodeLocation, copyErr) diff --git a/weed/shell/command_ec_rebuild.go b/weed/shell/command_ec_rebuild.go index 8cae77434..a7200c2c5 100644 --- a/weed/shell/command_ec_rebuild.go +++ b/weed/shell/command_ec_rebuild.go @@ -231,6 +231,7 @@ func prepareDataToRecover(commandEnv *CommandEnv, rebuilder *EcNode, collection CopyEcjFile: true, CopyVifFile: needEcxFile, SourceDataNode: ecNodes[0].info.Id, + Generation: 0, // shell commands operate on existing (generation 0) volumes }) return copyErr })