mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-24 06:50:40 +02:00
use memory when under 16 chunks
This commit is contained in:
1 parent
8e80f3cd65
commit
18ed06b420
1 file changed
+1
-1
@@ -62,7 +62,7 @@ func (up *UploadPipeline) SaveDataAt(p []byte, off int64) (n int) {
|
||||
|
||||
memChunk, found := up.writableChunks[logicChunkIndex]
|
||||
if !found {
|
||||
if len(up.writableChunks) < 0 {
|
||||
if len(up.writableChunks) < 16 {
|
||||
memChunk = NewMemChunk(logicChunkIndex, up.ChunkSize)
|
||||
} else {
|
||||
memChunk = up.swapFile.NewTempFileChunk(logicChunkIndex)
|
||||
|
||||
Reference in new issue
Block a user