Fix partitions may be not recovered with double load partitions (#23061)

Signed-off-by: yah01 <yang.cen@zilliz.com>
This commit is contained in:
yah01 2023-03-28 21:38:02 +08:00 committed by GitHub
parent 846de72fb3
commit dc6d4b913a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,11 +101,8 @@ func (m *CollectionManager) Recover(broker Broker) error {
for _, partition := range partitions {
// Partitions not loaded done should be deprecated
if partition.GetStatus() != querypb.LoadStatus_Loaded {
partitionIDs := lo.Map(partitions, func(partition *querypb.PartitionLoadInfo, _ int) int64 {
return partition.GetPartitionID()
})
m.store.ReleasePartition(collection, partitionIDs...)
break
m.store.ReleasePartition(collection, partition.GetPartitionID())
continue
}
m.partitions[partition.PartitionID] = &Partition{
PartitionLoadInfo: partition,