Add log for indexservice (#5754)

Signed-off-by: xiaocai2333 <cai.zhang@zilliz.com>
pull/5779/head
cai.zhang 2021-06-15 11:01:36 +08:00 committed by zhenshan.cao
parent fceba63a33
commit cf8953a347
3 changed files with 6 additions and 2 deletions

View File

@ -318,6 +318,7 @@ func (i *IndexService) BuildIndex(ctx context.Context, req *indexpb.BuildIndexRe
ret.Status.Reason = err.Error()
return ret, nil
}
log.Debug("IndexService BuildIndex Enqueue successfully", zap.Any("IndexBuildID", indexBuildID))
err = t.WaitToFinish()
if err != nil {
@ -611,7 +612,6 @@ func (i *IndexService) assignTasksServerStart() error {
if err = i.addNode(session.ServerID, req); err != nil {
log.Debug("IndexService", zap.Any("IndexService start find node fatal, err = ", err))
}
}
var serverIDs []int64
for _, session := range sessions {

View File

@ -36,6 +36,8 @@ func (i *IndexService) addNode(nodeID UniqueID, req *indexpb.RegisterNodeRequest
i.nodeLock.Lock()
defer i.nodeLock.Unlock()
log.Debug("IndexService addNode", zap.Any("nodeID", nodeID), zap.Any("node address", req.Address))
if i.nodeClients.CheckAddressExist(req.Address) {
log.Debug("IndexService", zap.Any("Node client already exist with ID:", nodeID))
return nil

View File

@ -107,12 +107,13 @@ func (it *IndexAddTask) OnEnqueue() error {
}
func (it *IndexAddTask) PreExecute(ctx context.Context) error {
log.Debug("IndexService IndexAddTask PreExecute", zap.Any("IndexBuildID", it.indexBuildID))
it.req.IndexBuildID = it.indexBuildID
return nil
}
func (it *IndexAddTask) Execute(ctx context.Context) error {
log.Debug("IndexService", zap.Any("BuildIndex, IndexBuildID = ", it.indexBuildID))
log.Debug("IndexService IndexAddTask Execute", zap.Any("IndexBuildID", it.indexBuildID))
err := it.table.AddIndex(it.indexBuildID, it.req)
if err != nil {
return err
@ -121,5 +122,6 @@ func (it *IndexAddTask) Execute(ctx context.Context) error {
}
func (it *IndexAddTask) PostExecute(ctx context.Context) error {
log.Debug("IndexService IndexAddTask PostExecute", zap.Any("IndexBuildID", it.indexBuildID))
return nil
}