Fix a bug of bulkload (#17620)

Signed-off-by: groot <yihua.mo@zilliz.com>
This commit is contained in:
groot 2022-06-17 20:52:11 +08:00 committed by GitHub
parent d69a41f63d
commit 371a44f018
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -512,7 +512,7 @@ func (p *ImportWrapper) splitFieldsData(fieldsData map[storage.FieldID]storage.F
rowIDField := fieldsData[common.RowIDField]
rowIDFieldArr := rowIDField.(*storage.Int64FieldData)
for i := rowIDBegin; i < rowIDEnd; i++ {
rowIDFieldArr.Data = append(rowIDFieldArr.Data, rowIDBegin+i)
rowIDFieldArr.Data = append(rowIDFieldArr.Data, i)
}
if primaryKey.GetAutoID() {
@ -520,7 +520,7 @@ func (p *ImportWrapper) splitFieldsData(fieldsData map[storage.FieldID]storage.F
primaryDataArr := primaryData.(*storage.Int64FieldData)
for i := rowIDBegin; i < rowIDEnd; i++ {
primaryDataArr.Data = append(primaryDataArr.Data, rowIDBegin+i)
primaryDataArr.Data = append(primaryDataArr.Data, i)
}
p.importResult.AutoIds = append(p.importResult.AutoIds, rowIDBegin, rowIDEnd)