mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
fix: alter collection with alias failed (#45447)
issue: #45397 Signed-off-by: sijie-ni-0214 <sijie.ni@zilliz.com>
This commit is contained in:
parent
4797bb6ab2
commit
77dc512b3b
@ -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),
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user