From 77dc512b3b638b29bdcade75ab3f3e3e70d50c38 Mon Sep 17 00:00:00 2001 From: sijie-ni-0214 Date: Tue, 11 Nov 2025 16:05:36 +0800 Subject: [PATCH] fix: alter collection with alias failed (#45447) issue: #45397 Signed-off-by: sijie-ni-0214 --- .../ddl_callbacks_alter_collection_properties.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/rootcoord/ddl_callbacks_alter_collection_properties.go b/internal/rootcoord/ddl_callbacks_alter_collection_properties.go index 3355ddddd5..5ff40caf69 100644 --- a/internal/rootcoord/ddl_callbacks_alter_collection_properties.go +++ b/internal/rootcoord/ddl_callbacks_alter_collection_properties.go @@ -227,19 +227,19 @@ func (c *Core) broadcastAlterCollectionForAlterDynamicField(ctx context.Context, } // getCacheExpireForCollection gets the cache expirations for collection. -func (c *Core) getCacheExpireForCollection(ctx context.Context, dbName string, collectionName string) (*message.CacheExpirations, error) { - coll, err := c.meta.GetCollectionByName(ctx, dbName, collectionName, typeutil.MaxTimestamp) +func (c *Core) getCacheExpireForCollection(ctx context.Context, dbName string, collectionNameOrAlias string) (*message.CacheExpirations, error) { + coll, err := c.meta.GetCollectionByName(ctx, dbName, collectionNameOrAlias, typeutil.MaxTimestamp) if err != nil { return nil, err } - aliases, err := c.meta.ListAliases(ctx, dbName, collectionName, typeutil.MaxTimestamp) + aliases, err := c.meta.ListAliases(ctx, dbName, coll.Name, typeutil.MaxTimestamp) if err != nil { return nil, err } builder := ce.NewBuilder() builder.WithLegacyProxyCollectionMetaCache( ce.OptLPCMDBName(dbName), - ce.OptLPCMCollectionName(collectionName), + ce.OptLPCMCollectionName(coll.Name), ce.OptLPCMCollectionID(coll.CollectionID), ce.OptLPCMMsgType(commonpb.MsgType_AlterCollection), )