Skip to content

Commit 75bb911

Browse files
craig[bot]danhhz
craig[bot]
andcommitted
Merge #38485
38485: importccl: fix fixtures import progress tracking r=tbg,dt a=danhhz The total batches denominator was previously unset, so got the zero value. This caused us to add infinite progress, which was truncated at 100%. Release note: None Co-authored-by: Daniel Harrison <[email protected]>
2 parents 97b8395 + efcc68d commit 75bb911

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/ccl/importccl/read_import_workload.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ func (w *workloadReader) readFiles(
136136
}
137137
}
138138

139+
wcs := make([]*WorkloadKVConverter, 0, len(dataFiles))
139140
for _, fileName := range dataFiles {
140141
file, err := url.Parse(fileName)
141142
if err != nil {
@@ -172,8 +173,12 @@ func (w *workloadReader) readFiles(
172173
return errors.Wrapf(err, `unknown table %s for generator %s`, conf.Table, meta.Name)
173174
}
174175

176+
numTotalBatches += conf.BatchEnd - conf.BatchBegin
175177
wc := NewWorkloadKVConverter(
176178
w.table, t.InitialRows, int(conf.BatchBegin), int(conf.BatchEnd), w.kvCh)
179+
wcs = append(wcs, wc)
180+
}
181+
for _, wc := range wcs {
177182
if err := ctxgroup.GroupWorkers(ctx, runtime.NumCPU(), func(ctx context.Context) error {
178183
evalCtx := w.evalCtx.Copy()
179184
return wc.Worker(ctx, evalCtx, finishedBatchFn)

0 commit comments

Comments
 (0)