mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-24 02:59:13 +08:00
skip md5 checking for now because of race condition
This commit is contained in:
parent
c8dea3dd89
commit
8295e2feb6
@ -67,7 +67,7 @@ func (fs *FilerServer) uploadReaderToChunks(w http.ResponseWriter, r *http.Reque
|
||||
go func(offset int64) {
|
||||
defer wg.Done()
|
||||
|
||||
chunk, toChunkErr := fs.dataToChunk(fileName, contentType, bytesBuffer.Bytes(), offset, so, md5Hash)
|
||||
chunk, toChunkErr := fs.dataToChunk(fileName, contentType, bytesBuffer.Bytes(), offset, so)
|
||||
if toChunkErr != nil {
|
||||
uploadErr = toChunkErr
|
||||
}
|
||||
@ -114,7 +114,7 @@ func (fs *FilerServer) doUpload(urlLocation string, limitedReader io.Reader, fil
|
||||
return uploadResult, err, data
|
||||
}
|
||||
|
||||
func (fs *FilerServer) dataToChunk(fileName, contentType string, data []byte, chunkOffset int64, so *operation.StorageOption, md5Hash hash.Hash) (*filer_pb.FileChunk, error) {
|
||||
func (fs *FilerServer) dataToChunk(fileName, contentType string, data []byte, chunkOffset int64, so *operation.StorageOption) (*filer_pb.FileChunk, error) {
|
||||
dataReader := util.NewBytesReader(data)
|
||||
|
||||
// retry to assign a different file id
|
||||
@ -149,13 +149,6 @@ func (fs *FilerServer) dataToChunk(fileName, contentType string, data []byte, ch
|
||||
if uploadResult.Size == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
if chunkOffset == 0 {
|
||||
uploadedMd5 := util.Base64Md5ToBytes(uploadResult.ContentMd5)
|
||||
readedMd5 := md5Hash.Sum(nil)
|
||||
if !bytes.Equal(uploadedMd5, readedMd5) {
|
||||
glog.Errorf("md5 %x does not match %x uploaded chunk %s to the volume server", readedMd5, uploadedMd5, uploadResult.Name)
|
||||
}
|
||||
}
|
||||
|
||||
return uploadResult.ToPbFileChunk(fileId, chunkOffset), nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user