mirror of https://github.com/milvus-io/milvus.git
Optimize rootcoord reSendDdMsg (#13363)
Signed-off-by: yudong.cai <yudong.cai@zilliz.com>pull/13371/head
parent
2cb8b10caa
commit
30e18cb5a7
|
@ -1055,7 +1055,7 @@ func (c *Core) reSendDdMsg(ctx context.Context, force bool) error {
|
||||||
|
|
||||||
var invalidateCache bool
|
var invalidateCache bool
|
||||||
var ts typeutil.Timestamp
|
var ts typeutil.Timestamp
|
||||||
var dbName, collName string
|
var collName string
|
||||||
|
|
||||||
switch ddOp.Type {
|
switch ddOp.Type {
|
||||||
// TODO remove create collection resend
|
// TODO remove create collection resend
|
||||||
|
@ -1079,7 +1079,7 @@ func (c *Core) reSendDdMsg(ctx context.Context, force bool) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
ts = ddReq.Base.Timestamp
|
ts = ddReq.Base.Timestamp
|
||||||
dbName, collName = ddReq.DbName, ddReq.CollectionName
|
collName = ddReq.CollectionName
|
||||||
collInfo, err := c.MetaTable.GetCollectionByName(ddReq.CollectionName, 0)
|
collInfo, err := c.MetaTable.GetCollectionByName(ddReq.CollectionName, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -1094,7 +1094,7 @@ func (c *Core) reSendDdMsg(ctx context.Context, force bool) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
ts = ddReq.Base.Timestamp
|
ts = ddReq.Base.Timestamp
|
||||||
dbName, collName = ddReq.DbName, ddReq.CollectionName
|
collName = ddReq.CollectionName
|
||||||
collInfo, err := c.MetaTable.GetCollectionByName(ddReq.CollectionName, 0)
|
collInfo, err := c.MetaTable.GetCollectionByName(ddReq.CollectionName, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -1112,7 +1112,7 @@ func (c *Core) reSendDdMsg(ctx context.Context, force bool) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
ts = ddReq.Base.Timestamp
|
ts = ddReq.Base.Timestamp
|
||||||
dbName, collName = ddReq.DbName, ddReq.CollectionName
|
collName = ddReq.CollectionName
|
||||||
collInfo, err := c.MetaTable.GetCollectionByName(ddReq.CollectionName, 0)
|
collInfo, err := c.MetaTable.GetCollectionByName(ddReq.CollectionName, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -1129,17 +1129,7 @@ func (c *Core) reSendDdMsg(ctx context.Context, force bool) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if invalidateCache {
|
if invalidateCache {
|
||||||
req := proxypb.InvalidateCollMetaCacheRequest{
|
c.ExpireMetaCache(ctx, []string{collName}, ts)
|
||||||
Base: &commonpb.MsgBase{
|
|
||||||
MsgType: 0, //TODO, msg type
|
|
||||||
MsgID: 0, //TODO, msg id
|
|
||||||
Timestamp: ts,
|
|
||||||
SourceID: c.session.ServerID,
|
|
||||||
},
|
|
||||||
DbName: dbName,
|
|
||||||
CollectionName: collName,
|
|
||||||
}
|
|
||||||
c.proxyClientManager.InvalidateCollectionMetaCache(c.ctx, &req)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update DDOperation in etcd
|
// Update DDOperation in etcd
|
||||||
|
|
Loading…
Reference in New Issue