From acf4e7a8cd8b73e981f456d80a615bc66c2f68ef Mon Sep 17 00:00:00 2001 From: Julie Tibshirani Date: Fri, 10 Nov 2023 17:53:24 -0800 Subject: [PATCH] Indexing: properly block on shard building --- build/builder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/builder.go b/build/builder.go index a442f57d..455e6f38 100644 --- a/build/builder.go +++ b/build/builder.go @@ -854,8 +854,8 @@ func (b *Builder) flush() error { if b.opts.Parallelism > 1 && b.opts.MemProfile == "" { b.building.Add(1) + b.throttle <- 1 go func() { - b.throttle <- 1 done, err := b.buildShard(todo, shard) <-b.throttle