aboutsummaryrefslogtreecommitdiff
path: root/weed/filer/stream.go
diff options
context:
space:
mode:
authorKonstantin Lebedev <lebedev_k@tochka.com>2021-03-16 15:29:49 +0500
committerKonstantin Lebedev <lebedev_k@tochka.com>2021-03-16 15:29:49 +0500
commiteb54993a4eacffde48007bb3bcc46b664d38c403 (patch)
tree1ef3f4cd86f9772631496a193bdeb62e25e780de /weed/filer/stream.go
parent06da02739d4a97dd8288f7fa05de7cd369e97d78 (diff)
parent9672f9e1b2ed399470e6ec877a667417c8b26870 (diff)
downloadseaweedfs-eb54993a4eacffde48007bb3bcc46b664d38c403.tar.xz
seaweedfs-eb54993a4eacffde48007bb3bcc46b664d38c403.zip
Merge branch 'upstreamMaster' into check_chunkviews_mr
# Conflicts: # weed/filer/filechunk_manifest.go # weed/filer/stream.go # weed/replication/repl_util/replication_util.go # weed/util/fasthttp_util.go
Diffstat (limited to 'weed/filer/stream.go')
-rw-r--r--weed/filer/stream.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/filer/stream.go b/weed/filer/stream.go
index f53563aa2..2584743c8 100644
--- a/weed/filer/stream.go
+++ b/weed/filer/stream.go
@@ -61,6 +61,7 @@ func StreamContent(masterClient wdclient.HasLookupFileIdFunction, w io.Writer, c
glog.Errorf("read chunk: %v", err)
return fmt.Errorf("read chunk: %v", err)
}
+
_, err = w.Write(data)
if err != nil {
glog.Errorf("write chunk: %v", err)
@@ -221,7 +222,7 @@ func (c *ChunkStreamReader) fetchChunkToBuffer(chunkView *ChunkView) error {
var buffer bytes.Buffer
var shouldRetry bool
for _, urlString := range urlStrings {
- shouldRetry, err = util.FastReadUrlAsStream(urlString, chunkView.CipherKey, chunkView.IsGzipped, chunkView.IsFullChunk(), false, chunkView.Offset, int(chunkView.Size), func(data []byte) {
+ shouldRetry, err = util.ReadUrlAsStream(urlString, chunkView.CipherKey, chunkView.IsGzipped, chunkView.IsFullChunk(), chunkView.Offset, int(chunkView.Size), func(data []byte) {
buffer.Write(data)
})
if !shouldRetry {