Browse Source

remove duplicated logic of removing from writableChunks

pull/3983/merge
chrislu 2 years ago
parent
commit
d1797deccb
  1. 4
      weed/mount/page_writer/upload_pipeline.go

4
weed/mount/page_writer/upload_pipeline.go

@ -73,9 +73,7 @@ func (up *UploadPipeline) SaveDataAt(p []byte, off int64, isSequential bool) (n
fullness = chunkFullness fullness = chunkFullness
} }
} }
fullWritableChunk := up.writableChunks[fullestChunkIndex]
delete(up.writableChunks, fullestChunkIndex)
up.moveToSealed(fullWritableChunk, fullestChunkIndex)
up.moveToSealed(up.writableChunks[fullestChunkIndex], fullestChunkIndex)
// fmt.Printf("flush chunk %d with %d bytes written\n", logicChunkIndex, fullness) // fmt.Printf("flush chunk %d with %d bytes written\n", logicChunkIndex, fullness)
} }
if isSequential && if isSequential &&

Loading…
Cancel
Save