Skip to content

Commit

Permalink
use vald errgroup
Browse files Browse the repository at this point in the history
  • Loading branch information
ykadowak committed Sep 19, 2023
1 parent 9a9e622 commit 4c22bcc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/index/job/correction/service/corrector.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ import (
"github.com/vdaas/vald/internal/net/grpc/codes"
"github.com/vdaas/vald/internal/net/grpc/status"
"github.com/vdaas/vald/internal/sync"
"github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/pkg/index/job/correction/config"
stdeg "golang.org/x/sync/errgroup"
)

type Corrector interface {
Expand Down Expand Up @@ -139,11 +139,11 @@ func (c *correct) correct(ctx context.Context) (err error) {
return err
}

seg, ctx := stdeg.WithContext(ctx)
seg, ctx := errgroup.WithContext(ctx)
concurrency := c.cfg.Corrector.GetStreamListConcurrency()
seg.SetLimit(concurrency)

bolteg, ctx := stdeg.WithContext(ctx)
bolteg, ctx := errgroup.WithContext(ctx)
bolteg.SetLimit(2048)

finalize := func() error {
Expand Down

0 comments on commit 4c22bcc

Please sign in to comment.