Fix bulkinsert progress bug (#21668)

Signed-off-by: groot <yihua.mo@zilliz.com>
pull/21721/head
groot 2023-01-14 11:17:40 +08:00 committed by GitHub
parent a13c375c48
commit d475de49db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -387,6 +387,7 @@ func (p *NumpyParser) consume(columnReaders []*NumpyColumnReader) error {
tr := timerecord.NewTimeRecorder("consume performance")
defer tr.Elapse("end")
// read data from files, batch by batch
totalRead := 0
for {
readRowCount := 0
segmentData := make(map[storage.FieldID]storage.FieldData)
@ -411,7 +412,8 @@ func (p *NumpyParser) consume(columnReaders []*NumpyColumnReader) error {
if readRowCount == 0 {
break
}
updateProgress(readRowCount)
totalRead += readRowCount
updateProgress(totalRead)
tr.Record("readData")
// split data to shards
err = p.splitFieldsData(segmentData, shards)