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
fix compaction logic
Chris Lu57e441d67be6
diff --git a/weed/storage/volume_vacuum.go b/weed/storage/volume_vacuum.goindex 73314f022d..0e5130572a 100644--- a/weed/storage/volume_vacuum.go+++ b/weed/storage/volume_vacuum.go@@ -23,7 +23,7 @@ func (v *Volume) garbageLevel() float64 {func (v *Volume) Compact(preallocate int64, compactionBytePerSecond int64) error {- if v.MemoryMapMaxSizeMb > 0 { //it makes no sense to compact in memory+ if v.MemoryMapMaxSizeMb == 0 { //it makes no sense to compact in memoryglog.V(3).Infof("Compacting volume %d ...", v.Id)//no need to lock for copy on write//v.accessLock.Lock()@@ -46,7 +46,7 @@ func (v *Volume) Compact(preallocate int64, compactionBytePerSecond int64) errorfunc (v *Volume) Compact2() error {- if v.MemoryMapMaxSizeMb > 0 { //it makes no sense to compact in memory+ if v.MemoryMapMaxSizeMb == 0 { //it makes no sense to compact in memoryglog.V(3).Infof("Compact2 volume %d ...", v.Id)v.isCompacting = true@@ -63,7 +63,7 @@ func (v *Volume) Compact2() error {}func (v *Volume) CommitCompact() error {- if v.MemoryMapMaxSizeMb > 0 { //it makes no sense to compact in memory+ if v.MemoryMapMaxSizeMb == 0 { //it makes no sense to compact in memoryglog.V(0).Infof("Committing volume %d vacuuming...", v.Id)v.isCompacting = true