mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-27 20:59:42 +08:00
Fix volume.tier.upload nil pointer panic (#5634)
This commit is contained in:
parent
f2a37933b1
commit
e1c671c028
@ -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…
Reference in New Issue
Block a user