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
lock "addChunks()"
Chris Lu0ae4d7bfdfb1
diff --git a/weed/filesys/dirty_page.go b/weed/filesys/dirty_page.goindex c1b78a2208..11089186fb 100644--- a/weed/filesys/dirty_page.go+++ b/weed/filesys/dirty_page.go@@ -15,10 +15,10 @@ type ContinuousDirtyPages struct {intervals *ContinuousIntervalsf *FilewriteWaitGroup sync.WaitGroup+ chunkAddLock sync.MutexchunkSaveErrChan chan errorchunkSaveErrChanClosed boollastErr error- lock sync.Mutexcollection stringreplication string}@@ -117,6 +117,8 @@ func (pages *ContinuousDirtyPages) saveToStorage(reader io.Reader, offset int64,}chunk.Mtime = mtimepages.collection, pages.replication = collection, replication+ pages.chunkAddLock.Lock()+ defer pages.chunkAddLock.Unlock()pages.f.addChunks([]*filer_pb.FileChunk{chunk})glog.V(3).Infof("%s saveToStorage [%d,%d)", pages.f.fullpath(), offset, offset+size)}