Skip to content
Snippets Groups Projects
Commit 9f339ef8 authored by zhenshan.cao's avatar zhenshan.cao Committed by yefu.chen
Browse files

Fix bug: indexbuilder req not initialized


Signed-off-by: default avatarzhenshan.cao <zhenshan.cao@zilliz.com>
parent a1151d9b
No related branches found
No related tags found
No related merge requests found
......@@ -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 {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment