diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-04-30 17:20:44 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-04-30 17:20:47 -0700 |
| commit | 871efa4fc15822d518f1bcc952ebf4d80fb0defd (patch) | |
| tree | 10a183e28a4c2441604cb487c44eb6ee04105915 /weed/messaging/broker/broker_append.go | |
| parent | 17d5ac4cd36ca4074b43bbe5cee5d9eb790c3ba4 (diff) | |
| download | seaweedfs-871efa4fc15822d518f1bcc952ebf4d80fb0defd.tar.xz seaweedfs-871efa4fc15822d518f1bcc952ebf4d80fb0defd.zip | |
refactoring
some previous chunk etag was using md5, which should be wrong.
Diffstat (limited to 'weed/messaging/broker/broker_append.go')
| -rw-r--r-- | weed/messaging/broker/broker_append.go | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/weed/messaging/broker/broker_append.go b/weed/messaging/broker/broker_append.go index 9c753ea26..e87e197b0 100644 --- a/weed/messaging/broker/broker_append.go +++ b/weed/messaging/broker/broker_append.go @@ -3,7 +3,6 @@ package broker import ( "context" "fmt" - "time" "github.com/chrislusf/seaweedfs/weed/glog" "github.com/chrislusf/seaweedfs/weed/operation" @@ -23,23 +22,13 @@ func (broker *MessageBroker) appendToFile(targetFile string, topicConfig *messag dir, name := util.FullPath(targetFile).DirAndName() - chunk := &filer_pb.FileChunk{ - FileId: assignResult.Fid, - Offset: 0, // needs to be fixed during appending - Size: uint64(uploadResult.Size), - Mtime: time.Now().UnixNano(), - ETag: uploadResult.ETag, - CipherKey: uploadResult.CipherKey, - IsGzipped: uploadResult.Gzip > 0, - } - // append the chunk if err := broker.WithFilerClient(func(client filer_pb.SeaweedFilerClient) error { request := &filer_pb.AppendToEntryRequest{ Directory: dir, EntryName: name, - Chunks: []*filer_pb.FileChunk{chunk}, + Chunks: []*filer_pb.FileChunk{uploadResult.ToPbFileChunk(assignResult.Fid, 0)}, } _, err := client.AppendToEntry(context.Background(), request) |
