mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
fix: should return collectionName in response of ListAliases (#30533)
issue : https://github.com/milvus-io/milvus/issues/30369 pr: https://github.com/milvus-io/milvus/pull/30532 Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
This commit is contained in:
parent
a209d05537
commit
48707f3aac
@ -311,6 +311,10 @@ func (a *DescribeAliasTask) OnEnqueue() error {
|
||||
func (a *DescribeAliasTask) PreExecute(ctx context.Context) error {
|
||||
a.Base.MsgType = commonpb.MsgType_DescribeAlias
|
||||
a.Base.SourceID = a.nodeID
|
||||
// collection alias uses the same format as collection name
|
||||
if err := ValidateCollectionAlias(a.GetAlias()); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -374,6 +378,12 @@ func (a *ListAliasesTask) OnEnqueue() error {
|
||||
func (a *ListAliasesTask) PreExecute(ctx context.Context) error {
|
||||
a.Base.MsgType = commonpb.MsgType_ListAliases
|
||||
a.Base.SourceID = a.nodeID
|
||||
|
||||
if len(a.GetCollectionName()) > 0 {
|
||||
if err := validateCollectionName(a.GetCollectionName()); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@ -379,7 +379,7 @@ func (s *Server) ReleasePartitions(ctx context.Context, req *querypb.ReleasePart
|
||||
}
|
||||
|
||||
if len(req.GetPartitionIDs()) == 0 {
|
||||
err := merr.WrapErrParameterInvalid("any parttiion", "empty partition list")
|
||||
err := merr.WrapErrParameterInvalid("any partition", "empty partition list")
|
||||
log.Warn("no partition to release", zap.Error(err))
|
||||
metrics.QueryCoordReleaseCount.WithLabelValues(metrics.FailLabel).Inc()
|
||||
return merr.Status(err), nil
|
||||
|
||||
@ -1916,9 +1916,10 @@ func (c *Core) ListAliases(ctx context.Context, in *milvuspb.ListAliasesRequest)
|
||||
|
||||
log.Info("done to list aliases")
|
||||
return &milvuspb.ListAliasesResponse{
|
||||
Status: merr.Status(nil),
|
||||
DbName: in.GetDbName(),
|
||||
Aliases: aliases,
|
||||
Status: merr.Status(nil),
|
||||
DbName: in.GetDbName(),
|
||||
CollectionName: in.GetCollectionName(),
|
||||
Aliases: aliases,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user