SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
Waiting for writes to complete with acquired locks may lead to deadlock, fixes #4952
Viktor Kuzmin06e723f62957
diff --git a/weed/mount/page_writer/upload_pipeline.go b/weed/mount/page_writer/upload_pipeline.goindex 267ea3a4cd..bd7fc99dd1 100644--- a/weed/mount/page_writer/upload_pipeline.go+++ b/weed/mount/page_writer/upload_pipeline.go@@ -147,14 +147,17 @@ func (up *UploadPipeline) MaybeReadDataAt(p []byte, off int64, tsNs int64) (maxS}func (up *UploadPipeline) FlushAll() {+ up.flushChunks()+ up.waitForCurrentWritersToComplete()+}++func (up *UploadPipeline) flushChunks() {up.chunksLock.Lock()defer up.chunksLock.Unlock()for logicChunkIndex, memChunk := range up.writableChunks {up.moveToSealed(memChunk, logicChunkIndex)}-- up.waitForCurrentWritersToComplete()}func (up *UploadPipeline) maybeMoveToSealed(memChunk PageChunk, logicChunkIndex LogicChunkIndex) {