mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 20:09:57 +08:00
Fix bug: refresh config after session init (#14194)
Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
This commit is contained in:
parent
a3942571c4
commit
9a2c91d326
@ -209,11 +209,8 @@ func (node *DataNode) Init() error {
|
|||||||
log.Error("DataNode init session failed", zap.Error(err))
|
log.Error("DataNode init session failed", zap.Error(err))
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Params.DataNodeCfg.Refresh()
|
||||||
|
|
||||||
// TODO: caiyd need check
|
|
||||||
//Params.initMsgChannelSubName()
|
|
||||||
//TODO reset
|
|
||||||
//Params.initLogCfg()
|
|
||||||
log.Debug("DataNode Init",
|
log.Debug("DataNode Init",
|
||||||
zap.String("MsgChannelSubName", Params.DataNodeCfg.MsgChannelSubName),
|
zap.String("MsgChannelSubName", Params.DataNodeCfg.MsgChannelSubName),
|
||||||
)
|
)
|
||||||
|
@ -142,8 +142,7 @@ func (node *Proxy) Init() error {
|
|||||||
log.Error("Proxy init session failed", zap.Error(err))
|
log.Error("Proxy init session failed", zap.Error(err))
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// TODO: caiyd need check
|
Params.ProxyCfg.Refresh()
|
||||||
//Params.initProxySubName()
|
|
||||||
// wait for datacoord state changed to Healthy
|
// wait for datacoord state changed to Healthy
|
||||||
if node.dataCoord != nil {
|
if node.dataCoord != nil {
|
||||||
log.Debug("Proxy wait for DataCoord ready")
|
log.Debug("Proxy wait for DataCoord ready")
|
||||||
|
@ -186,6 +186,7 @@ func (node *QueryNode) Init() error {
|
|||||||
initError = err
|
initError = err
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Params.QueryNodeCfg.Refresh()
|
||||||
connectEtcdFn := func() error {
|
connectEtcdFn := func() error {
|
||||||
etcdKV, err := etcdkv.NewEtcdKV(Params.QueryNodeCfg.EtcdEndpoints, Params.QueryNodeCfg.MetaRootPath)
|
etcdKV, err := etcdkv.NewEtcdKV(Params.QueryNodeCfg.EtcdEndpoints, Params.QueryNodeCfg.MetaRootPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -253,9 +254,6 @@ func (node *QueryNode) Init() error {
|
|||||||
zap.Any("IP", Params.QueryNodeCfg.QueryNodeIP),
|
zap.Any("IP", Params.QueryNodeCfg.QueryNodeIP),
|
||||||
zap.Any("Port", Params.QueryNodeCfg.QueryNodePort),
|
zap.Any("Port", Params.QueryNodeCfg.QueryNodePort),
|
||||||
)
|
)
|
||||||
// This param needs valid QueryNodeID
|
|
||||||
//Params.initMsgChannelSubName()
|
|
||||||
// TODO: caiyd need check
|
|
||||||
})
|
})
|
||||||
|
|
||||||
return initError
|
return initError
|
||||||
|
@ -541,6 +541,11 @@ func (p *proxyConfig) init(bp *BaseParamTable) {
|
|||||||
//p.initRoleName()
|
//p.initRoleName()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Refresh is called after session init
|
||||||
|
func (p *proxyConfig) Refresh() {
|
||||||
|
p.initProxySubName()
|
||||||
|
}
|
||||||
|
|
||||||
// InitAlias initialize Alias member.
|
// InitAlias initialize Alias member.
|
||||||
func (p *proxyConfig) InitAlias(alias string) {
|
func (p *proxyConfig) InitAlias(alias string) {
|
||||||
p.Alias = alias
|
p.Alias = alias
|
||||||
@ -1101,6 +1106,11 @@ func (p *queryNodeConfig) InitAlias(alias string) {
|
|||||||
p.Alias = alias
|
p.Alias = alias
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Refresh is called after session init
|
||||||
|
func (p *queryNodeConfig) Refresh() {
|
||||||
|
p.initMsgChannelSubName()
|
||||||
|
}
|
||||||
|
|
||||||
func (p *queryNodeConfig) initCacheSize() {
|
func (p *queryNodeConfig) initCacheSize() {
|
||||||
defer log.Debug("init cacheSize", zap.Any("cacheSize (GB)", p.CacheSize))
|
defer log.Debug("init cacheSize", zap.Any("cacheSize (GB)", p.CacheSize))
|
||||||
|
|
||||||
@ -1725,6 +1735,11 @@ func (p *dataNodeConfig) init(bp *BaseParamTable) {
|
|||||||
//p.initRoleName()
|
//p.initRoleName()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Refresh is called after session init
|
||||||
|
func (p *dataNodeConfig) Refresh() {
|
||||||
|
p.initMsgChannelSubName()
|
||||||
|
}
|
||||||
|
|
||||||
// InitAlias init this DataNode alias
|
// InitAlias init this DataNode alias
|
||||||
func (p *dataNodeConfig) InitAlias(alias string) {
|
func (p *dataNodeConfig) InitAlias(alias string) {
|
||||||
p.Alias = alias
|
p.Alias = alias
|
||||||
|
Loading…
Reference in New Issue
Block a user