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.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
Fix wrong error handling in volume.tier.upload when stream == nil but copyErr != nil (#6867)
NyaMisty53e5c845233c
diff --git a/weed/shell/command_volume_tier_upload.go b/weed/shell/command_volume_tier_upload.goindex 5ef1c5209e..7eff20876d 100644--- a/weed/shell/command_volume_tier_upload.go+++ b/weed/shell/command_volume_tier_upload.go@@ -147,11 +147,15 @@ func uploadDatToRemoteTier(grpcDialOption grpc.DialOption, writer io.Writer, volKeepLocalDatFile: keepLocalDatFile,})- if stream == nil && copyErr == nil {- // when the volume is already uploaded, VolumeTierMoveDatToRemote will return nil stream and nil error- // so we should directly return in this case- fmt.Fprintf(writer, "volume %v already uploaded", volumeId)- return nil+ if stream == nil {+ if copyErr == nil {+ // when the volume is already uploaded, VolumeTierMoveDatToRemote will return nil stream and nil error+ // so we should directly return in this caseAdd commentMore actions+ fmt.Fprintf(writer, "volume %v already uploaded", volumeId)+ return nil+ } else {+ return copyErr+ }}var lastProcessed int64for {