Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

readerAt need to use the right offset

Chris Lu8f7d2d317f7a
diff --git a/weed/filer/stream.go b/weed/filer/stream.go
index c61ee3c12d..cad37a080e 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)
}