未验证 提交 30e18cb5 编写于 作者: C Cai Yudong 提交者: GitHub

Optimize rootcoord reSendDdMsg (#13363)

Signed-off-by: Nyudong.cai <yudong.cai@zilliz.com>
上级 2cb8b10c
......@@ -1055,7 +1055,7 @@ func (c *Core) reSendDdMsg(ctx context.Context, force bool) error {
var invalidateCache bool
var ts typeutil.Timestamp
var dbName, collName string
var collName string
switch ddOp.Type {
// TODO remove create collection resend
......@@ -1079,7 +1079,7 @@ func (c *Core) reSendDdMsg(ctx context.Context, force bool) error {
return err
}
ts = ddReq.Base.Timestamp
dbName, collName = ddReq.DbName, ddReq.CollectionName
collName = ddReq.CollectionName
collInfo, err := c.MetaTable.GetCollectionByName(ddReq.CollectionName, 0)
if err != nil {
return err
......@@ -1094,7 +1094,7 @@ func (c *Core) reSendDdMsg(ctx context.Context, force bool) error {
return err
}
ts = ddReq.Base.Timestamp
dbName, collName = ddReq.DbName, ddReq.CollectionName
collName = ddReq.CollectionName
collInfo, err := c.MetaTable.GetCollectionByName(ddReq.CollectionName, 0)
if err != nil {
return err
......@@ -1112,7 +1112,7 @@ func (c *Core) reSendDdMsg(ctx context.Context, force bool) error {
return err
}
ts = ddReq.Base.Timestamp
dbName, collName = ddReq.DbName, ddReq.CollectionName
collName = ddReq.CollectionName
collInfo, err := c.MetaTable.GetCollectionByName(ddReq.CollectionName, 0)
if err != nil {
return err
......@@ -1129,17 +1129,7 @@ func (c *Core) reSendDdMsg(ctx context.Context, force bool) error {
}
if invalidateCache {
req := proxypb.InvalidateCollMetaCacheRequest{
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)
c.ExpireMetaCache(ctx, []string{collName}, ts)
}
// Update DDOperation in etcd
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册