mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-11-09 04:54:46 +08:00
Fix wrong error handling in volume.tier.upload when stream == nil but copyErr != nil (#6867)
This commit is contained in:
@@ -147,11 +147,15 @@ func uploadDatToRemoteTier(grpcDialOption grpc.DialOption, writer io.Writer, vol
|
|||||||
KeepLocalDatFile: keepLocalDatFile,
|
KeepLocalDatFile: keepLocalDatFile,
|
||||||
})
|
})
|
||||||
|
|
||||||
if stream == nil && copyErr == nil {
|
if stream == nil {
|
||||||
|
if copyErr == nil {
|
||||||
// when the volume is already uploaded, VolumeTierMoveDatToRemote will return nil stream and nil error
|
// when the volume is already uploaded, VolumeTierMoveDatToRemote will return nil stream and nil error
|
||||||
// so we should directly return in this case
|
// so we should directly return in this caseAdd commentMore actions
|
||||||
fmt.Fprintf(writer, "volume %v already uploaded", volumeId)
|
fmt.Fprintf(writer, "volume %v already uploaded", volumeId)
|
||||||
return nil
|
return nil
|
||||||
|
} else {
|
||||||
|
return copyErr
|
||||||
|
}
|
||||||
}
|
}
|
||||||
var lastProcessed int64
|
var lastProcessed int64
|
||||||
for {
|
for {
|
||||||
|
|||||||
Reference in New Issue
Block a user