mirror of https://github.com/milvus-io/milvus.git
Fix panic while balancing releasing collection (#24003)
Signed-off-by: yah01 <yang.cen@zilliz.com>pull/24032/head
parent
5819e98ebb
commit
67cf23d050
|
@ -64,7 +64,7 @@ func (b *BalanceChecker) replicasToBalance() []int64 {
|
||||||
// all replicas belonging to loading collection will be skipped
|
// all replicas belonging to loading collection will be skipped
|
||||||
loadedCollections := lo.Filter(ids, func(cid int64, _ int) bool {
|
loadedCollections := lo.Filter(ids, func(cid int64, _ int) bool {
|
||||||
collection := b.meta.GetCollection(cid)
|
collection := b.meta.GetCollection(cid)
|
||||||
return collection != nil && collection.Status == querypb.LoadStatus_Loaded
|
return collection != nil && collection.GetStatus() == querypb.LoadStatus_Loaded
|
||||||
})
|
})
|
||||||
sort.Slice(loadedCollections, func(i, j int) bool {
|
sort.Slice(loadedCollections, func(i, j int) bool {
|
||||||
return loadedCollections[i] < loadedCollections[j]
|
return loadedCollections[i] < loadedCollections[j]
|
||||||
|
|
Loading…
Reference in New Issue