refactoring

some previous chunk etag was using md5, which should be wrong.
This commit is contained in:
Chris Lu
2020-04-30 17:20:44 -07:00
parent 17d5ac4cd3
commit 871efa4fc1
8 changed files with 25 additions and 83 deletions

View File

@@ -187,15 +187,7 @@ func (pages *ContinuousDirtyPages) saveToStorage(reader io.Reader, offset int64,
}
pages.f.wfs.chunkCache.SetChunk(fileId, data)
return &filer_pb.FileChunk{
FileId: fileId,
Offset: offset,
Size: uint64(size),
Mtime: time.Now().UnixNano(),
ETag: uploadResult.ETag,
CipherKey: uploadResult.CipherKey,
IsGzipped: uploadResult.Gzip > 0,
}, nil
return uploadResult.ToPbFileChunk(fileId, offset), nil
}