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
Update volume_growth_reservation_test.go
chrislucb9a662e20f6
diff --git a/weed/topology/volume_growth_reservation_test.go b/weed/topology/volume_growth_reservation_test.goindex e65d7c6185..442995b806 100644--- a/weed/topology/volume_growth_reservation_test.go+++ b/weed/topology/volume_growth_reservation_test.go@@ -139,6 +139,7 @@ func TestVolumeGrowth_ConcurrentAllocationPreventsRaceCondition(t *testing.T) {const concurrentRequests = 10var wg sync.WaitGroupvar successCount, failureCount atomic.Int32+ var commitMutex sync.Mutex // Ensures atomic commit of volume creation + reservation releasefor i := 0; i < concurrentRequests; i++ {wg.Add(1)@@ -156,6 +157,8 @@ func TestVolumeGrowth_ConcurrentAllocationPreventsRaceCondition(t *testing.T) {// Simulate completion: increment volume count BEFORE releasing reservationif reservation != nil {+ commitMutex.Lock()+// First, increment the volume count to reflect the created volume// Acquire lock briefly to access children map, then release before updatingdn.RLock()@@ -169,6 +172,8 @@ func TestVolumeGrowth_ConcurrentAllocationPreventsRaceCondition(t *testing.T) {// Then release the reservationreservation.releaseAllReservations()++ commitMutex.Unlock()}}}(i)