From 8b915a93ce66d4074ca85cdd3feafad14413e008 Mon Sep 17 00:00:00 2001 From: chrislu Date: Sun, 25 Dec 2022 12:10:48 -0800 Subject: [PATCH] use mem chunk only, swap file chunk has problems --- weed/mount/page_writer/upload_pipeline.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/mount/page_writer/upload_pipeline.go b/weed/mount/page_writer/upload_pipeline.go index 03e84a2ad..91cd81abb 100644 --- a/weed/mount/page_writer/upload_pipeline.go +++ b/weed/mount/page_writer/upload_pipeline.go @@ -77,7 +77,7 @@ func (up *UploadPipeline) SaveDataAt(p []byte, off int64, isSequential bool, tsN up.moveToSealed(up.writableChunks[oldestChunkIndex], oldestChunkIndex) // fmt.Printf("flush chunk %d with %d bytes written\n", logicChunkIndex, oldestTs) } - if false && isSequential && + if true || isSequential && len(up.writableChunks) < up.writableChunkLimit && atomic.LoadInt64(&memChunkCounter) < 4*int64(up.writableChunkLimit) { pageChunk = NewMemChunk(logicChunkIndex, up.ChunkSize)