mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 20:09:57 +08:00
Fix data race in querycoordv2 (#19240)
Signed-off-by: sunby <bingyi.sun@zilliz.com> Signed-off-by: sunby <bingyi.sun@zilliz.com> Co-authored-by: sunby <bingyi.sun@zilliz.com>
This commit is contained in:
parent
50ea4eeef1
commit
77aee8cb65
@ -63,14 +63,6 @@ func (node *MockQueryNode) Start() error {
|
||||
err = node.server.Serve(lis)
|
||||
}()
|
||||
|
||||
// Regiser
|
||||
node.session.Init(typeutil.QueryNodeRole, node.addr, false, true)
|
||||
node.ID = node.session.ServerID
|
||||
node.session.Register()
|
||||
log.Debug("mock QueryNode started",
|
||||
zap.Int64("nodeID", node.ID),
|
||||
zap.String("nodeAddr", node.addr))
|
||||
|
||||
successStatus := &commonpb.Status{
|
||||
ErrorCode: commonpb.ErrorCode_Success,
|
||||
}
|
||||
@ -103,6 +95,14 @@ func (node *MockQueryNode) Start() error {
|
||||
node.segmentVersion[segment.GetSegmentID()] = req.GetVersion()
|
||||
}).Return(successStatus, nil).Maybe()
|
||||
|
||||
// Regiser
|
||||
node.session.Init(typeutil.QueryNodeRole, node.addr, false, true)
|
||||
node.ID = node.session.ServerID
|
||||
node.session.Register()
|
||||
log.Debug("mock QueryNode started",
|
||||
zap.Int64("nodeID", node.ID),
|
||||
zap.String("nodeAddr", node.addr))
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user