Skip to content

Commit

Permalink
set eg limit from config
Browse files Browse the repository at this point in the history
  • Loading branch information
ykadowak committed Aug 18, 2023
1 parent 568279f commit b67c272
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/index/job/correction/service/corrector.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (c *correct) correct(ctx context.Context, addrs []string) (err error) {
}

seg, ctx := stdeg.WithContext(ctx)
seg.SetLimit(100) // FIXME: server settingsをそのまま流用で良いのか?
seg.SetLimit(c.cfg.Server.GetGRPCStreamConcurrency()) // FIXME: server settingsをそのまま流用で良いのか?

finalize := func() error {
err = seg.Wait()
Expand Down Expand Up @@ -205,7 +205,7 @@ func (c *correct) correct2(ctx context.Context, addrs []string) (err error) {
if err := c.discoverer.GetClient().OrderedRange(ctx, addrs,
func(ctx context.Context, addr string, conn *grpc.ClientConn, copts ...grpc.CallOption) error {
eg, ctx := errgroup.New(ctx)
eg.Limitation(100)
eg.Limitation(c.cfg.Server.GetGRPCStreamConcurrency())

vc := vald.NewValdClient(conn)
stream, err := vc.StreamListObject(ctx, &payload.Object_List_Request{})
Expand Down

0 comments on commit b67c272

Please sign in to comment.