mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
Fix bug: indexbuilder req not initialized
Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
This commit is contained in:
parent
a1151d9bf5
commit
9f339ef8ce
@ -88,6 +88,7 @@ func (it *IndexAddTask) Execute() error {
|
||||
t.table = it.table
|
||||
t.indexID = it.indexID
|
||||
t.kv = it.kv
|
||||
t.req = it.req
|
||||
var cancel func()
|
||||
t.ctx, cancel = context.WithTimeout(it.ctx, reqTimeoutInterval)
|
||||
defer cancel()
|
||||
@ -121,7 +122,7 @@ type IndexBuildTask struct {
|
||||
indexID UniqueID
|
||||
kv kv.Base
|
||||
savePaths []string
|
||||
indexMeta *indexbuilderpb.IndexMeta
|
||||
req *indexbuilderpb.BuildIndexRequest
|
||||
}
|
||||
|
||||
func newIndexBuildTask() *IndexBuildTask {
|
||||
@ -151,7 +152,7 @@ func (it *IndexBuildTask) Execute() error {
|
||||
}
|
||||
|
||||
typeParams := make(map[string]string)
|
||||
for _, kvPair := range it.indexMeta.Req.GetTypeParams() {
|
||||
for _, kvPair := range it.req.GetTypeParams() {
|
||||
key, value := kvPair.GetKey(), kvPair.GetValue()
|
||||
_, ok := typeParams[key]
|
||||
if ok {
|
||||
@ -161,7 +162,7 @@ func (it *IndexBuildTask) Execute() error {
|
||||
}
|
||||
|
||||
indexParams := make(map[string]string)
|
||||
for _, kvPair := range it.indexMeta.Req.GetIndexParams() {
|
||||
for _, kvPair := range it.req.GetIndexParams() {
|
||||
key, value := kvPair.GetKey(), kvPair.GetValue()
|
||||
_, ok := indexParams[key]
|
||||
if ok {
|
||||
@ -201,7 +202,7 @@ func (it *IndexBuildTask) Execute() error {
|
||||
return blobs
|
||||
}
|
||||
|
||||
toLoadDataPaths := it.indexMeta.Req.GetDataPaths()
|
||||
toLoadDataPaths := it.req.GetDataPaths()
|
||||
keys := make([]string, 0)
|
||||
blobs := make([]*Blob, 0)
|
||||
for _, path := range toLoadDataPaths {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user