Skip to content

Commit

Permalink
fix: clean snapshots meta (milvus-io#28502)
Browse files Browse the repository at this point in the history
issue: milvus-io#28496
/kind bug

The input parameters collection.partitions and collection.Field are both
nil, so these two metas have not been cleared.

Signed-off-by: xige-16 <[email protected]>

Signed-off-by: xige-16 <[email protected]>
  • Loading branch information
xige-16 authored and czs007 committed Dec 5, 2023
1 parent 3d7bcb5 commit ff16e15
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/rootcoord/meta_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,13 @@ func (mt *MetaTable) RemoveCollection(ctx context.Context, collectionID UniqueID

ctx1 := contextutil.WithTenantID(ctx, Params.CommonCfg.ClusterName.GetValue())
aliases := mt.listAliasesByID(collectionID)
newColl := &model.Collection{CollectionID: collectionID, Aliases: aliases, DBID: coll.DBID}
newColl := &model.Collection{
CollectionID: collectionID,
Partitions: model.ClonePartitions(coll.Partitions),
Fields: model.CloneFields(coll.Fields),
Aliases: aliases,
DBID: coll.DBID,
}
if err := mt.catalog.DropCollection(ctx1, newColl, ts); err != nil {
return err
}
Expand Down

0 comments on commit ff16e15

Please sign in to comment.