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
sync before closing index file
Chris Lu08e47025427b
diff --git a/weed/storage/needle_map_memory.go b/weed/storage/needle_map_memory.goindex 37dee78899..84197912f7 100644--- a/weed/storage/needle_map_memory.go+++ b/weed/storage/needle_map_memory.go@@ -64,6 +64,10 @@ func (nm *NeedleMap) Delete(key NeedleId, offset Offset) error {return nm.appendToIndexFile(key, offset, TombstoneFileSize)}func (nm *NeedleMap) Close() {+ indexFileName := nm.indexFile.Name()+ if err := nm.indexFile.Sync(); err != nil {+ glog.Warningf("sync file %s failed, %v", indexFileName, err)+ }_ = nm.indexFile.Close()}func (nm *NeedleMap) Destroy() error {