Browse Source

Fix volume.tier.upload nil pointer panic (#5634)

pull/5638/head
NyaMisty 7 months ago
committed by GitHub
parent
commit
e1c671c028
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      weed/shell/command_volume_tier_upload.go

6
weed/shell/command_volume_tier_upload.go

@ -139,6 +139,12 @@ func uploadDatToRemoteTier(grpcDialOption grpc.DialOption, writer io.Writer, vol
KeepLocalDatFile: 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
}
var lastProcessed int64
for {
resp, recvErr := stream.Recv()

Loading…
Cancel
Save