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
pass in bytes buffer to avoid possible race condition
chrislu8802843511ef
diff --git a/weed/server/filer_server_handlers_write_upload.go b/weed/server/filer_server_handlers_write_upload.goindex 58ea8cda2e..cb16eadc31 100644--- a/weed/server/filer_server_handlers_write_upload.go+++ b/weed/server/filer_server_handlers_write_upload.go@@ -100,7 +100,7 @@ func (fs *FilerServer) uploadReaderToChunks(reader io.Reader, startOffset int64,}wg.Add(1)- go func(offset int64) {+ go func(offset int64, buf *bytes.Buffer) {defer func() {bufPool.Put(bytesBuffer)<-bytesBufferLimitChan@@ -124,7 +124,7 @@ func (fs *FilerServer) uploadReaderToChunks(reader io.Reader, startOffset int64,}fileChunksLock.Unlock()}- }(chunkOffset)+ }(chunkOffset, bytesBuffer)// reset variables for the next chunkchunkOffset = chunkOffset + dataSize