From a31fc1ac015a111bbb18a66e5d304c84a4f95d1d Mon Sep 17 00:00:00 2001 From: chrislu Date: Sun, 10 Aug 2025 20:39:48 -0700 Subject: [PATCH] Bypass compaction revision check to handle volumes compacted after task creation --- weed/worker/tasks/erasure_coding/ec_task.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/weed/worker/tasks/erasure_coding/ec_task.go b/weed/worker/tasks/erasure_coding/ec_task.go index 7e6b04954..a3a3d46dd 100644 --- a/weed/worker/tasks/erasure_coding/ec_task.go +++ b/weed/worker/tasks/erasure_coding/ec_task.go @@ -271,10 +271,11 @@ func (t *ErasureCodingTask) copyFileFromSource(ext, localPath string) error { return operation.WithVolumeServerClient(false, pb.ServerAddress(t.server), grpc.WithInsecure(), func(client volume_server_pb.VolumeServerClient) error { stream, err := client.CopyFile(context.Background(), &volume_server_pb.CopyFileRequest{ - VolumeId: t.volumeID, - Collection: t.collection, - Ext: ext, - StopOffset: uint64(math.MaxInt64), + VolumeId: t.volumeID, + Collection: t.collection, + Ext: ext, + StopOffset: uint64(math.MaxInt64), + CompactionRevision: math.MaxUint32, // Bypass compaction revision check to handle volumes compacted after task creation }) if err != nil { return fmt.Errorf("failed to initiate file copy: %v", err)