未验证 提交 3a024307 编写于 作者: X xige-16 提交者: GitHub

Release collection first when drop collection (#15370)

Signed-off-by: Nxige-16 <xi.ge@zilliz.com>
上级 5bc6ec72
......@@ -296,6 +296,12 @@ func (t *DropCollectionReqTask) Execute(ctx context.Context) error {
return fmt.Errorf("TSO alloc fail, error = %w", err)
}
//notify query service to release collection
if err = t.core.CallReleaseCollectionService(t.core.ctx, ts, 0, collMeta.ID); err != nil {
log.Error("Failed to CallReleaseCollectionService", zap.Error(err))
return err
}
// build DdOperation and save it into etcd, when ddmsg send fail,
// system can restore ddmsg from etcd and re-send
ddReq.Base.Timestamp = ts
......@@ -360,12 +366,6 @@ func (t *DropCollectionReqTask) Execute(ctx context.Context) error {
return err
}
//notify query service to release collection
if err = t.core.CallReleaseCollectionService(t.core.ctx, ts, 0, collMeta.ID); err != nil {
log.Error("Failed to CallReleaseCollectionService", zap.Error(err))
return err
}
t.core.ExpireMetaCache(ctx, []string{t.Req.CollectionName}, ts)
t.core.ExpireMetaCache(ctx, aliases, ts)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册