Browse Source

tmp enable swap file chunk

pull/4089/head
chrislu 2 years ago
parent
commit
985137ec47
  1. 2
      weed/mount/page_writer/upload_pipeline.go

2
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) up.moveToSealed(up.writableChunks[oldestChunkIndex], oldestChunkIndex)
// fmt.Printf("flush chunk %d with %d bytes written\n", logicChunkIndex, oldestTs) // fmt.Printf("flush chunk %d with %d bytes written\n", logicChunkIndex, oldestTs)
} }
if true || isSequential &&
if isSequential &&
len(up.writableChunks) < up.writableChunkLimit && len(up.writableChunks) < up.writableChunkLimit &&
atomic.LoadInt64(&memChunkCounter) < 4*int64(up.writableChunkLimit) { atomic.LoadInt64(&memChunkCounter) < 4*int64(up.writableChunkLimit) {
pageChunk = NewMemChunk(logicChunkIndex, up.ChunkSize) pageChunk = NewMemChunk(logicChunkIndex, up.ChunkSize)

Loading…
Cancel
Save