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.

remove dup code for section.reader access (#6169)

Bruce15fc58bfd99e
diff --git a/weed/filer/filechunk_section.go b/weed/filer/filechunk_section.go
index ba591d9acc..75273a1ca4 100644
--- a/weed/filer/filechunk_section.go
+++ b/weed/filer/filechunk_section.go
@@ -1,8 +1,9 @@
package filer
import (
- "github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
"sync"
+
+ "github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
)
const SectionSize = 2 * 1024 * 1024 * 32 // 64MiB
@@ -62,11 +63,6 @@ func removeGarbageChunks(section *FileChunkSection, garbageFileIds map[string]st
}
func (section *FileChunkSection) setupForRead(group *ChunkGroup, fileSize int64) {
- if section.isPrepared {
- section.reader.fileSize = fileSize
- return
- }
-
section.lock.Lock()
defer section.lock.Unlock()