diff options
| author | Bruce <half-life@jibudata.com> | 2024-11-06 11:08:59 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-05 19:08:59 -0800 |
| commit | 15fc58bfd99ee2ff01326d2f653c69d72db4f1f4 (patch) | |
| tree | 4ad83c5a9c7f5a2e2c8d4a2bc6d83d7dd7240fd8 | |
| parent | 706d1a8e22b962f976c0fc2f60966cebbe586b12 (diff) | |
| download | seaweedfs-15fc58bfd99ee2ff01326d2f653c69d72db4f1f4.tar.xz seaweedfs-15fc58bfd99ee2ff01326d2f653c69d72db4f1f4.zip | |
remove dup code for section.reader access (#6169)
| -rw-r--r-- | weed/filer/filechunk_section.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/weed/filer/filechunk_section.go b/weed/filer/filechunk_section.go index ba591d9ac..75273a1ca 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() |
