Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

filer.copy: don't crash when volume creation fails

Kyle Sanderson9e012001becf
diff --git a/weed/command/filer_copy.go b/weed/command/filer_copy.go
index 88ae55e844..185a1d0ff1 100644
--- a/weed/command/filer_copy.go
+++ b/weed/command/filer_copy.go
@@ -482,7 +482,8 @@ func (worker *FileCopyWorker) uploadFileInChunks(task FileCopyTask, f *os.File,
})
})
if err != nil {
- fmt.Printf("Failed to assign from %v: %v\n", worker.options.masters, err)
+ uploadError = fmt.Errorf("Failed to assign from %v: %v\n", worker.options.masters, err)
+ return
}
targetUrl := "http://" + assignResult.Location.Url + "/" + assignResult.FileId