aboutsummaryrefslogtreecommitdiff
path: root/weed/messaging/broker/broker_append.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/messaging/broker/broker_append.go')
-rw-r--r--weed/messaging/broker/broker_append.go13
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)