From 8f7d2d317f7a5b30068e429adcdb9e00bc01d0e4 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 15 Aug 2021 11:55:58 -0700 Subject: [PATCH] readerAt need to use the right offset fix https://github.com/chrislusf/seaweedfs/issues/2259 --- weed/filer/stream.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/weed/filer/stream.go b/weed/filer/stream.go index c61ee3c12..cad37a080 100644 --- a/weed/filer/stream.go +++ b/weed/filer/stream.go @@ -132,9 +132,10 @@ func NewChunkStreamReader(filerClient filer_pb.FilerClient, chunks []*filer_pb.F } func (c *ChunkStreamReader) ReadAt(p []byte, off int64) (n int, err error) { - if err = c.prepareBufferFor(c.logicOffset); err != nil { + if err = c.prepareBufferFor(off); err != nil { return } + c.logicOffset = off return c.Read(p) }