fix: err degenerated to a new variable (#35891)

https://github.com/milvus-io/milvus/issues/35890

Signed-off-by: fengjun2016 <jornfeng@gmail.com>
This commit is contained in:
CharlesFeng 2024-09-04 14:57:04 +08:00 committed by GitHub
parent 24fb10114b
commit 6eb8b3f745
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -143,11 +143,13 @@ func (t *L0ImportTask) Execute() []*conc.Future[any] {
fmt.Sprintf("there should be one prefix for l0 import, but got %v", t.req.GetFiles()))
return
}
pkField, err := typeutil.GetPrimaryFieldSchema(t.GetSchema())
var pkField *schemapb.FieldSchema
pkField, err = typeutil.GetPrimaryFieldSchema(t.GetSchema())
if err != nil {
return
}
reader, err := binlog.NewL0Reader(t.ctx, t.cm, pkField, t.req.GetFiles()[0], bufferSize)
var reader binlog.L0Reader
reader, err = binlog.NewL0Reader(t.ctx, t.cm, pkField, t.req.GetFiles()[0], bufferSize)
if err != nil {
return
}