aboutsummaryrefslogtreecommitdiff
path: root/weed/filer2
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-04-30 17:20:44 -0700
committerChris Lu <chris.lu@gmail.com>2020-04-30 17:20:47 -0700
commit871efa4fc15822d518f1bcc952ebf4d80fb0defd (patch)
tree10a183e28a4c2441604cb487c44eb6ee04105915 /weed/filer2
parent17d5ac4cd36ca4074b43bbe5cee5d9eb790c3ba4 (diff)
downloadseaweedfs-871efa4fc15822d518f1bcc952ebf4d80fb0defd.tar.xz
seaweedfs-871efa4fc15822d518f1bcc952ebf4d80fb0defd.zip
refactoring
some previous chunk etag was using md5, which should be wrong.
Diffstat (limited to 'weed/filer2')
-rw-r--r--weed/filer2/filer_notify_append.go11
1 files changed, 1 insertions, 10 deletions
diff --git a/weed/filer2/filer_notify_append.go b/weed/filer2/filer_notify_append.go
index efe7b0213..af291058c 100644
--- a/weed/filer2/filer_notify_append.go
+++ b/weed/filer2/filer_notify_append.go
@@ -38,16 +38,7 @@ func (f *Filer) appendToFile(targetFile string, data []byte) error {
}
// append to existing chunks
- chunk := &filer_pb.FileChunk{
- FileId: assignResult.Fid,
- Offset: offset,
- Size: uint64(uploadResult.Size),
- Mtime: time.Now().UnixNano(),
- ETag: uploadResult.ETag,
- CipherKey: uploadResult.CipherKey,
- IsGzipped: uploadResult.Gzip > 0,
- }
- entry.Chunks = append(entry.Chunks, chunk)
+ entry.Chunks = append(entry.Chunks, uploadResult.ToPbFileChunk(assignResult.Fid, offset))
// update the entry
err = f.CreateEntry(context.Background(), entry, false)