Fix panic while balancing releasing collection (#24003)

Signed-off-by: yah01 <yang.cen@zilliz.com>
pull/24032/head
yah01 2023-05-11 12:47:20 +08:00 committed by GitHub
parent 5819e98ebb
commit 67cf23d050
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ func (b *BalanceChecker) replicasToBalance() []int64 {
// all replicas belonging to loading collection will be skipped
loadedCollections := lo.Filter(ids, func(cid int64, _ int) bool {
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 {
return loadedCollections[i] < loadedCollections[j]