enhance: Correct misleading nodeID in GetComponentStates's log (#30731)

This PR corrects the misleading nodeId in GetComponentStates's log

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
This commit is contained in:
wei liu 2024-02-28 13:13:12 +08:00 committed by GitHub
parent 8a219e0102
commit 382b7485a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -63,11 +63,11 @@ func (node *QueryNode) GetComponentStates(ctx context.Context, req *milvuspb.Get
code := node.lifetime.GetState()
nodeID := common.NotRegisteredID
log.Debug("QueryNode current state", zap.Int64("NodeID", nodeID), zap.String("StateCode", code.String()))
if node.session != nil && node.session.Registered() {
nodeID = node.GetNodeID()
}
log.Debug("QueryNode current state", zap.Int64("NodeID", nodeID), zap.String("StateCode", code.String()))
info := &milvuspb.ComponentInfo{
NodeID: nodeID,
Role: typeutil.QueryNodeRole,