mirror of https://github.com/milvus-io/milvus.git
Use GetCollectionByName instead
Signed-off-by: neza2017 <yefu.chen@zilliz.com>pull/4973/head^2
parent
454c05f2de
commit
51eac0eb84
|
@ -414,13 +414,10 @@ func (t *ShowPartitionReqTask) IgnoreTimeStamp() bool {
|
|||
}
|
||||
|
||||
func (t *ShowPartitionReqTask) Execute() error {
|
||||
coll, err := t.core.MetaTable.GetCollectionByID(t.Req.CollectionID)
|
||||
coll, err := t.core.MetaTable.GetCollectionByName(t.Req.CollectionName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if coll.Schema.Name != t.Req.CollectionName {
|
||||
return errors.Errorf("collection %s not exist", t.Req.CollectionName)
|
||||
}
|
||||
for _, partID := range coll.PartitionIDs {
|
||||
partMeta, err := t.core.MetaTable.GetPartitionByID(partID)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue