mirror of https://github.com/milvus-io/milvus.git
parent
a4328617ad
commit
a0d3450457
|
@ -126,7 +126,7 @@ func (i *IndexNode) Init() error {
|
||||||
i.initOnce.Do(func() {
|
i.initOnce.Do(func() {
|
||||||
Params.Init()
|
Params.Init()
|
||||||
i.UpdateStateCode(internalpb.StateCode_Initializing)
|
i.UpdateStateCode(internalpb.StateCode_Initializing)
|
||||||
log.Debug("IndexNode", zap.Any("State", internalpb.StateCode_Initializing))
|
log.Debug("IndexNode init", zap.Any("State", internalpb.StateCode_Initializing))
|
||||||
connectEtcdFn := func() error {
|
connectEtcdFn := func() error {
|
||||||
etcdKV, err := etcdkv.NewEtcdKV(Params.EtcdEndpoints, Params.MetaRootPath)
|
etcdKV, err := etcdkv.NewEtcdKV(Params.EtcdEndpoints, Params.MetaRootPath)
|
||||||
i.etcdKV = etcdKV
|
i.etcdKV = etcdKV
|
||||||
|
@ -138,7 +138,7 @@ func (i *IndexNode) Init() error {
|
||||||
initErr = err
|
initErr = err
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.Debug("IndexNode try connect etcd success")
|
log.Debug("IndexNode connect to etcd successfully")
|
||||||
|
|
||||||
option := &miniokv.Option{
|
option := &miniokv.Option{
|
||||||
Address: Params.MinIOAddress,
|
Address: Params.MinIOAddress,
|
||||||
|
@ -157,7 +157,7 @@ func (i *IndexNode) Init() error {
|
||||||
|
|
||||||
i.kv = kv
|
i.kv = kv
|
||||||
|
|
||||||
log.Debug("IndexNode NewMinIOKV success")
|
log.Debug("IndexNode NewMinIOKV successfully")
|
||||||
i.closer = trace.InitTracing("index_node")
|
i.closer = trace.InitTracing("index_node")
|
||||||
|
|
||||||
i.initKnowhere()
|
i.initKnowhere()
|
||||||
|
@ -202,7 +202,7 @@ func (i *IndexNode) Stop() error {
|
||||||
for _, cb := range i.closeCallbacks {
|
for _, cb := range i.closeCallbacks {
|
||||||
cb()
|
cb()
|
||||||
}
|
}
|
||||||
log.Debug("NodeImpl closed.")
|
log.Debug("Index node stopped.")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ func (i *IndexNode) CreateIndex(ctx context.Context, request *indexpb.CreateInde
|
||||||
Reason: "state code is not healthy",
|
Reason: "state code is not healthy",
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
log.Debug("IndexNode building index ...",
|
log.Info("IndexNode building index ...",
|
||||||
zap.Int64("IndexBuildID", request.IndexBuildID),
|
zap.Int64("IndexBuildID", request.IndexBuildID),
|
||||||
zap.String("IndexName", request.IndexName),
|
zap.String("IndexName", request.IndexName),
|
||||||
zap.Int64("IndexID", request.IndexID),
|
zap.Int64("IndexID", request.IndexID),
|
||||||
|
@ -255,11 +255,12 @@ func (i *IndexNode) CreateIndex(ctx context.Context, request *indexpb.CreateInde
|
||||||
|
|
||||||
err := i.sched.IndexBuildQueue.Enqueue(t)
|
err := i.sched.IndexBuildQueue.Enqueue(t)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
log.Warn("IndexNode failed to schedule", zap.Int64("indexBuildID", request.IndexBuildID), zap.Error(err))
|
||||||
ret.ErrorCode = commonpb.ErrorCode_UnexpectedError
|
ret.ErrorCode = commonpb.ErrorCode_UnexpectedError
|
||||||
ret.Reason = err.Error()
|
ret.Reason = err.Error()
|
||||||
return ret, nil
|
return ret, nil
|
||||||
}
|
}
|
||||||
log.Debug("IndexNode", zap.Int64("IndexNode successfully schedule with indexBuildID", request.IndexBuildID))
|
log.Info("IndexNode successfully schedule", zap.Int64("indexBuildID", request.IndexBuildID))
|
||||||
|
|
||||||
return ret, nil
|
return ret, nil
|
||||||
}
|
}
|
||||||
|
@ -343,9 +344,6 @@ func (i *IndexNode) GetMetrics(ctx context.Context, req *milvuspb.GetMetricsRequ
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Debug("IndexNode.GetMetrics",
|
|
||||||
zap.String("metric_type", metricType))
|
|
||||||
|
|
||||||
if metricType == metricsinfo.SystemInfoMetrics {
|
if metricType == metricsinfo.SystemInfoMetrics {
|
||||||
metrics, err := getSystemInfoMetrics(ctx, req, i)
|
metrics, err := getSystemInfoMetrics(ctx, req, i)
|
||||||
|
|
||||||
|
@ -359,7 +357,7 @@ func (i *IndexNode) GetMetrics(ctx context.Context, req *milvuspb.GetMetricsRequ
|
||||||
return metrics, err
|
return metrics, err
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Debug("IndexNode.GetMetrics failed, request metric type is not implemented yet",
|
log.Warn("IndexNode.GetMetrics failed, request metric type is not implemented yet",
|
||||||
zap.Int64("node_id", Params.NodeID),
|
zap.Int64("node_id", Params.NodeID),
|
||||||
zap.String("req", req.Request),
|
zap.String("req", req.Request),
|
||||||
zap.String("metric_type", metricType))
|
zap.String("metric_type", metricType))
|
||||||
|
|
Loading…
Reference in New Issue