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
FUSE Mount: resolve memory leak in Read method goroutine (#7270) (#7282)
Jaehoon Kimfc89e97af736
diff --git a/weed/mount/weedfs_file_read.go b/weed/mount/weedfs_file_read.goindex dc79d3dc74..5a5a5efabf 100644--- a/weed/mount/weedfs_file_read.go+++ b/weed/mount/weedfs_file_read.go@@ -49,10 +49,14 @@ func (wfs *WFS) Read(cancel <-chan struct{}, in *fuse.ReadIn, buff []byte) (fuse// Create a context that will be cancelled when the cancel channel receives a signalctx, cancelFunc := context.WithCancel(context.Background())+ defer cancelFunc()+go func() {select {case <-cancel:cancelFunc()+ case <-ctx.Done():+ // Context already cancelled, exit goroutine}}()