aboutsummaryrefslogtreecommitdiff
path: root/weed/replication/sink/gcssink
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-08-15 09:32:47 -0700
committerChris Lu <chris.lu@gmail.com>2020-08-15 09:32:47 -0700
commitc647deace16ec1a3f0c11d92dc5fa15ec30012e4 (patch)
tree7b13546507283b5566a069d03dc3371ccd2d7290 /weed/replication/sink/gcssink
parentc03bb180eb5fc96e79324f0aa5ec7cd9b674f901 (diff)
downloadseaweedfs-c647deace16ec1a3f0c11d92dc5fa15ec30012e4.tar.xz
seaweedfs-c647deace16ec1a3f0c11d92dc5fa15ec30012e4.zip
file size support set file length
use Attr.FileSize and TotalChunkSize to determine file size
Diffstat (limited to 'weed/replication/sink/gcssink')
-rw-r--r--weed/replication/sink/gcssink/gcs_sink.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/replication/sink/gcssink/gcs_sink.go b/weed/replication/sink/gcssink/gcs_sink.go
index 4b58160db..35a7dd9f7 100644
--- a/weed/replication/sink/gcssink/gcs_sink.go
+++ b/weed/replication/sink/gcssink/gcs_sink.go
@@ -89,7 +89,7 @@ func (g *GcsSink) CreateEntry(key string, entry *filer_pb.Entry) error {
return nil
}
- totalSize := filer2.TotalSize(entry.Chunks)
+ totalSize := filer2.FileSize(entry)
chunkViews := filer2.ViewFromChunks(g.filerSource.LookupFileId, entry.Chunks, 0, int64(totalSize))
wc := g.client.Bucket(g.bucket).Object(key).NewWriter(context.Background())