This commit is contained in:
Chris Lu
2020-03-17 10:01:55 -07:00
parent b964bbab3d
commit bec6ec7db6
7 changed files with 32 additions and 24 deletions

View File

@@ -20,7 +20,7 @@ func (fs *FilerSink) replicateChunks(sourceChunks []*filer_pb.FileChunk, dir str
return
}
replicatedChunks = make([]*filer_pb.FileChunk, len(sourceChunks))
replicatedChunks = make([]*filer_pb.FileChunk, len(sourceChunks))
var wg sync.WaitGroup
for chunkIndex, sourceChunk := range sourceChunks {

View File

@@ -162,6 +162,6 @@ func (s3sink *S3Sink) buildReadSeeker(chunk *filer2.ChunkView) (io.ReadSeeker, e
return nil, err
}
buf := make([]byte, chunk.Size)
util.ReadUrl(fileUrl, nil, false,false, chunk.Offset, int(chunk.Size), buf)
util.ReadUrl(fileUrl, nil, false, false, chunk.Offset, int(chunk.Size), buf)
return bytes.NewReader(buf), nil
}