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
volume close should wait for committing compaction
chrislu70e5a1b632ca
diff --git a/weed/storage/volume.go b/weed/storage/volume.goindex bebeded54b..3539efa852 100644--- a/weed/storage/volume.go+++ b/weed/storage/volume.go@@ -210,11 +210,13 @@ func (v *Volume) SyncToDisk() {func (v *Volume) Close() {v.dataFileAccessLock.Lock()defer v.dataFileAccessLock.Unlock()++ for v.isCommitCompacting {+ time.Sleep(521 * time.Millisecond)+ glog.Warningf("Volume Close wait for compaction %d", v.Id)+ }+if v.nm != nil {- for v.isCompacting {- glog.Warningf("Volume being closed during compression idx %d", v.Id)- time.Sleep(time.Second)- }if err := v.nm.Sync(); err != nil {glog.Warningf("Volume Close fail to sync volume idx %d", v.Id)}