mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
a little optimization
This commit is contained in:
parent
3eb336e0b0
commit
c899bdf063
|
@ -72,10 +72,12 @@ func (fs *FilerServer) uploadReaderToChunks(w http.ResponseWriter, r *http.Reque
|
||||||
if uploadResult.Size == 0 {
|
if uploadResult.Size == 0 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
uploadedMd5 := util.Base64Md5ToBytes(uploadResult.ContentMd5)
|
if chunkOffset == 0 {
|
||||||
readedMd5 := md5Hash.Sum(nil)
|
uploadedMd5 := util.Base64Md5ToBytes(uploadResult.ContentMd5)
|
||||||
if !bytes.Equal(uploadedMd5, readedMd5) && chunkOffset == 0 {
|
readedMd5 := md5Hash.Sum(nil)
|
||||||
glog.Errorf("md5 %x does not match %x uploaded chunk %s to the volume server", readedMd5, uploadedMd5, uploadResult.Name)
|
if !bytes.Equal(uploadedMd5, readedMd5) {
|
||||||
|
glog.Errorf("md5 %x does not match %x uploaded chunk %s to the volume server", readedMd5, uploadedMd5, uploadResult.Name)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save to chunk manifest structure
|
// Save to chunk manifest structure
|
||||||
|
|
Loading…
Reference in a new issue