aboutsummaryrefslogtreecommitdiff
path: root/weed/filer2/stream.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-08-19 00:43:07 -0700
committerChris Lu <chris.lu@gmail.com>2020-08-19 00:43:07 -0700
commitc27e18aa6a1c17190816d95876e45093646d477a (patch)
tree4a3cfd503a9bee031a8eb85387b14d0e526b8f07 /weed/filer2/stream.go
parenta78772d5ea235e55ef515d1de28c2201ee9a5d66 (diff)
downloadseaweedfs-c27e18aa6a1c17190816d95876e45093646d477a.tar.xz
seaweedfs-c27e18aa6a1c17190816d95876e45093646d477a.zip
read possible old deleted chunks
Diffstat (limited to 'weed/filer2/stream.go')
-rw-r--r--weed/filer2/stream.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/filer2/stream.go b/weed/filer2/stream.go
index e9707d3ae..fee9d45da 100644
--- a/weed/filer2/stream.go
+++ b/weed/filer2/stream.go
@@ -32,7 +32,7 @@ func StreamContent(masterClient *wdclient.MasterClient, w io.Writer, chunks []*f
for _, chunkView := range chunkViews {
urlString := fileId2Url[chunkView.FileId]
- err := util.ReadUrlAsStream(urlString, chunkView.CipherKey, chunkView.IsGzipped, chunkView.IsFullChunk(), chunkView.Offset, int(chunkView.Size), func(data []byte) {
+ err := util.ReadUrlAsStream(urlString+"?readDeleted=true", chunkView.CipherKey, chunkView.IsGzipped, chunkView.IsFullChunk(), chunkView.Offset, int(chunkView.Size), func(data []byte) {
w.Write(data)
})
if err != nil {
@@ -63,7 +63,7 @@ func ReadAll(masterClient *wdclient.MasterClient, chunks []*filer_pb.FileChunk)
glog.V(1).Infof("operation LookupFileId %s failed, err: %v", chunkView.FileId, err)
return nil, err
}
- err = util.ReadUrlAsStream(urlString, chunkView.CipherKey, chunkView.IsGzipped, chunkView.IsFullChunk(), chunkView.Offset, int(chunkView.Size), func(data []byte) {
+ err = util.ReadUrlAsStream(urlString+"?readDeleted=true", chunkView.CipherKey, chunkView.IsGzipped, chunkView.IsFullChunk(), chunkView.Offset, int(chunkView.Size), func(data []byte) {
buffer.Write(data)
})
if err != nil {
@@ -175,7 +175,7 @@ func (c *ChunkStreamReader) fetchChunkToBuffer(chunkView *ChunkView) error {
return err
}
var buffer bytes.Buffer
- err = util.ReadUrlAsStream(urlString, chunkView.CipherKey, chunkView.IsGzipped, chunkView.IsFullChunk(), chunkView.Offset, int(chunkView.Size), func(data []byte) {
+ err = util.ReadUrlAsStream(urlString+"?readDeleted=true", chunkView.CipherKey, chunkView.IsGzipped, chunkView.IsFullChunk(), chunkView.Offset, int(chunkView.Size), func(data []byte) {
buffer.Write(data)
})
if err != nil {