mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 11:59:00 +08:00
Release collection first when drop collection (#15370)
Signed-off-by: xige-16 <xi.ge@zilliz.com>
This commit is contained in:
parent
5bc6ec7250
commit
3a024307f4
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user