diff --git a/state/history.go b/state/history.go index 2dba97057..29dce97ec 100644 --- a/state/history.go +++ b/state/history.go @@ -304,11 +304,6 @@ func (h *History) BuildMissedIndices(ctx context.Context, sem *semaphore.Weighte for _, item := range missedFiles { item := item g.Go(func() error { - if err := sem.Acquire(ctx, 1); err != nil { - return err - } - defer sem.Release(1) - search := &filesItem{startTxNum: item.startTxNum, endTxNum: item.endTxNum} iiItem, ok := h.InvertedIndex.files.Get(search) if !ok { diff --git a/state/inverted_index.go b/state/inverted_index.go index bb0ec7ac2..819b1ccfc 100644 --- a/state/inverted_index.go +++ b/state/inverted_index.go @@ -260,10 +260,6 @@ func (ii *InvertedIndex) BuildMissedIndices(ctx context.Context, sem *semaphore. for _, item := range missedFiles { item := item g.Go(func() error { - if err := sem.Acquire(ctx, 1); err != nil { - return err - } - defer sem.Release(1) fromStep, toStep := item.startTxNum/ii.aggregationStep, item.endTxNum/ii.aggregationStep fName := fmt.Sprintf("%s.%d-%d.efi", ii.filenameBase, fromStep, toStep) idxPath := filepath.Join(ii.dir, fName)