From 454c05f2defcfaff52b652c1a4dbc52d16adb99c Mon Sep 17 00:00:00 2001
From: dragondriver <jiquan.long@zilliz.com>
Date: Sat, 30 Jan 2021 10:40:22 +0800
Subject: [PATCH] Implement the InvalidateCollectionMetaCacheTask in Proxy

Signed-off-by: dragondriver <jiquan.long@zilliz.com>
---
 internal/proxynode/impl.go | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/internal/proxynode/impl.go b/internal/proxynode/impl.go
index cb014501e..6b248738a 100644
--- a/internal/proxynode/impl.go
+++ b/internal/proxynode/impl.go
@@ -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) {
-- 
GitLab