Skip to content

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.

remove duplicated logic of removing from writableChunks

chrislud1797deccb81
diff --git a/weed/mount/page_writer/upload_pipeline.go b/weed/mount/page_writer/upload_pipeline.go
index bce062a6e8..252dddc06f 100644
--- a/weed/mount/page_writer/upload_pipeline.go
+++ b/weed/mount/page_writer/upload_pipeline.go
@@ -73,9 +73,7 @@ func (up *UploadPipeline) SaveDataAt(p []byte, off int64, isSequential bool) (n
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)
}
if isSequential &&