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.

deal with handle not found when flushing

chrisluf99a818ad225
diff --git a/weed/mount/weedfs_file_sync.go b/weed/mount/weedfs_file_sync.go
index 11ce1d3c45..e13ab198d6 100644
--- a/weed/mount/weedfs_file_sync.go
+++ b/weed/mount/weedfs_file_sync.go
@@ -54,7 +54,9 @@ import (
func (wfs *WFS) Flush(cancel <-chan struct{}, in *fuse.FlushIn) fuse.Status {
fh := wfs.GetHandle(FileHandleId(in.Fh))
if fh == nil {
- return fuse.ENOENT
+ // If handle is not found, it might have been already released
+ // This is not an error condition for FLUSH
+ return fuse.OK
}
return wfs.doFlush(fh, in.Uid, in.Gid)