e3: temporary remove semaphore (#888)

This commit is contained in:
Alex Sharov 2023-02-12 16:06:24 +07:00 committed by GitHub
parent aa2b561741
commit e57fe47ffb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 9 deletions

View File

@ -304,11 +304,6 @@ func (h *History) BuildMissedIndices(ctx context.Context, sem *semaphore.Weighte
for _, item := range missedFiles { for _, item := range missedFiles {
item := item item := item
g.Go(func() error { 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} search := &filesItem{startTxNum: item.startTxNum, endTxNum: item.endTxNum}
iiItem, ok := h.InvertedIndex.files.Get(search) iiItem, ok := h.InvertedIndex.files.Get(search)
if !ok { if !ok {

View File

@ -260,10 +260,6 @@ func (ii *InvertedIndex) BuildMissedIndices(ctx context.Context, sem *semaphore.
for _, item := range missedFiles { for _, item := range missedFiles {
item := item item := item
g.Go(func() error { 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 fromStep, toStep := item.startTxNum/ii.aggregationStep, item.endTxNum/ii.aggregationStep
fName := fmt.Sprintf("%s.%d-%d.efi", ii.filenameBase, fromStep, toStep) fName := fmt.Sprintf("%s.%d-%d.efi", ii.filenameBase, fromStep, toStep)
idxPath := filepath.Join(ii.dir, fName) idxPath := filepath.Join(ii.dir, fName)