Bruce
2 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
6 deletions
-
weed/filer/filechunk_section.go
|
@ -1,8 +1,9 @@ |
|
|
package filer |
|
|
package filer |
|
|
|
|
|
|
|
|
import ( |
|
|
import ( |
|
|
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb" |
|
|
|
|
|
"sync" |
|
|
"sync" |
|
|
|
|
|
|
|
|
|
|
|
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
const SectionSize = 2 * 1024 * 1024 * 32 // 64MiB
|
|
|
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) { |
|
|
func (section *FileChunkSection) setupForRead(group *ChunkGroup, fileSize int64) { |
|
|
if section.isPrepared { |
|
|
|
|
|
section.reader.fileSize = fileSize |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
section.lock.Lock() |
|
|
section.lock.Lock() |
|
|
defer section.lock.Unlock() |
|
|
defer section.lock.Unlock() |
|
|
|
|
|
|
|
|