Check collection whether exists before drop

Signed-off-by: godchen <qingxiang.chen@zilliz.com>
pull/4973/head^2
godchen 2021-02-01 10:53:13 +08:00 committed by yefu.chen
parent abcc565311
commit 94dfab5b21
3 changed files with 5 additions and 8 deletions

View File

@ -21,7 +21,7 @@ func (c *Client) Init() error {
if err != nil {
return err
}
c.grpcClient = proxypb.NewProxyServiceClient(conn)
c.grpcClient = proxypb.NewProxyNodeServiceClient(conn)
return nil
}
err := retry.Retry(10, time.Millisecond*200, connectGrpcFunc)

View File

@ -411,12 +411,12 @@ func (dct *DropCollectionTask) PreExecute() error {
func (dct *DropCollectionTask) Execute() error {
var err error
collID, err := globalMetaCache.GetCollectionID(dct.CollectionName)
if err != nil {
return err
}
dct.result, err = dct.masterClient.DropCollection(dct.DropCollectionRequest)
if dct.result.ErrorCode == commonpb.ErrorCode_SUCCESS {
collID, err := globalMetaCache.GetCollectionID(dct.CollectionName)
if err != nil {
return err
}
err = globalInsertChannelsMap.closeInsertMsgStream(collID)
if err != nil {
return err

View File

@ -30,7 +30,6 @@ const (
MasterYamlContent = "advanced/master.yaml"
ProxyNodeYamlContent = "advanced/proxy_node.yaml"
QueryNodeYamlContent = "advanced/query_node.yaml"
WriteNodeYamlContent = "advanced/write_node.yaml"
MilvusYamlContent = "milvus.yaml"
)
@ -62,7 +61,6 @@ func (s *ServiceImpl) fillNodeInitParams() error {
masterYamlContent := getConfigContentByName(MasterYamlContent)
proxyNodeYamlContent := getConfigContentByName(ProxyNodeYamlContent)
queryNodeYamlContent := getConfigContentByName(QueryNodeYamlContent)
writeNodeYamlContent := getConfigContentByName(WriteNodeYamlContent)
milvusYamlContent := getConfigContentByName(MilvusYamlContent)
appendContent := func(key string, content []byte) {
@ -77,7 +75,6 @@ func (s *ServiceImpl) fillNodeInitParams() error {
appendContent(MasterYamlContent, masterYamlContent)
appendContent(ProxyNodeYamlContent, proxyNodeYamlContent)
appendContent(QueryNodeYamlContent, queryNodeYamlContent)
appendContent(WriteNodeYamlContent, writeNodeYamlContent)
appendContent(MilvusYamlContent, milvusYamlContent)
// var allContent []byte