diff --git a/exp/lighthorizon/index/backend/parallel_flush.go b/exp/lighthorizon/index/backend/parallel_flush.go index 4f9b14e783..1c52746302 100644 --- a/exp/lighthorizon/index/backend/parallel_flush.go +++ b/exp/lighthorizon/index/backend/parallel_flush.go @@ -21,7 +21,9 @@ func parallelFlush(parallel uint32, allIndexes map[string]types.NamedIndices, f batches := make(chan *batch, parallel) + wg.Add(1) go func() { + defer wg.Done() for account, indexes := range allIndexes { batches <- &batch{ account: account,