diff --git a/pkg/blobserver/diskpacked/diskpacked.go b/pkg/blobserver/diskpacked/diskpacked.go index 2a9ed50d7..6b2b5d217 100644 --- a/pkg/blobserver/diskpacked/diskpacked.go +++ b/pkg/blobserver/diskpacked/diskpacked.go @@ -236,6 +236,7 @@ func (s *storage) StatBlobs(dest chan<- blob.SizedRef, blobs []blob.Ref) (err er var wg syncutil.Group for _, br := range blobs { + br := br statGate.Start() wg.Go(func() error { defer statGate.Done() diff --git a/pkg/blobserver/localdisk/stat.go b/pkg/blobserver/localdisk/stat.go index fa3a93d3c..86dcf05cd 100644 --- a/pkg/blobserver/localdisk/stat.go +++ b/pkg/blobserver/localdisk/stat.go @@ -50,6 +50,7 @@ func (ds *DiskStorage) StatBlobs(dest chan<- blob.SizedRef, blobs []blob.Ref) er var wg syncutil.Group for _, ref := range blobs { + ref := ref statGate.Start() wg.Go(func() error { defer statGate.Done() diff --git a/pkg/blobserver/s3/remove.go b/pkg/blobserver/s3/remove.go index 9db1c8755..3fd727bd5 100644 --- a/pkg/blobserver/s3/remove.go +++ b/pkg/blobserver/s3/remove.go @@ -27,6 +27,7 @@ func (sto *s3Storage) RemoveBlobs(blobs []blob.Ref) error { var wg syncutil.Group for _, blob := range blobs { + blob := blob removeGate.Start() wg.Go(func() error { defer removeGate.Done() diff --git a/pkg/blobserver/s3/stat.go b/pkg/blobserver/s3/stat.go index 225b1a0af..7a53d15fa 100644 --- a/pkg/blobserver/s3/stat.go +++ b/pkg/blobserver/s3/stat.go @@ -30,6 +30,7 @@ func (sto *s3Storage) StatBlobs(dest chan<- blob.SizedRef, blobs []blob.Ref) err var wg syncutil.Group for _, br := range blobs { + br := br statGate.Start() wg.Go(func() error { defer statGate.Done()