Implement the InvalidateCollectionMetaCacheTask in Proxy

Signed-off-by: dragondriver <jiquan.long@zilliz.com>
pull/4973/head^2
dragondriver 2021-01-30 10:40:22 +08:00 committed by yefu.chen
parent 4d5a9e067c
commit 454c05f2de
1 changed files with 6 additions and 1 deletions

View File

@ -25,7 +25,12 @@ func (node *NodeImpl) UpdateStateCode(code internalpb2.StateCode) {
}
func (node *NodeImpl) InvalidateCollectionMetaCache(ctx context.Context, request *proxypb.InvalidateCollMetaCacheRequest) (*commonpb.Status, error) {
panic("implement me")
collectionName := request.CollectionName
_ = globalMetaCache.Remove(collectionName) // no need to return error, though collection may be not cached
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
Reason: "",
}, nil
}
func (node *NodeImpl) CreateCollection(request *milvuspb.CreateCollectionRequest) (*commonpb.Status, error) {