Merge pull request #4970 from dolthub/aaron/conjoin-ctx-not-canceled

go/store/nbs: conjoiner.go: Fix bug with use of canceled context.
This commit is contained in:
Aaron Son
2022-12-12 10:47:28 -08:00
committed by GitHub
+2 -2
View File
@@ -187,13 +187,13 @@ func conjoin(ctx context.Context, s conjoinStrategy, upstream manifestContents,
}
func conjoinTables(ctx context.Context, conjoinees []tableSpec, p tablePersister, stats *Stats) (conjoined tableSpec, err error) {
eg, ctx := errgroup.WithContext(ctx)
eg, ectx := errgroup.WithContext(ctx)
toConjoin := make(chunkSources, len(conjoinees))
for idx := range conjoinees {
i, spec := idx, conjoinees[idx]
eg.Go(func() (err error) {
toConjoin[i], err = p.Open(ctx, spec.name, spec.chunkCount, stats)
toConjoin[i], err = p.Open(ectx, spec.name, spec.chunkCount, stats)
return
})
}