From b04eb170888c3ffce6f201aae60a6c1660ca24c7 Mon Sep 17 00:00:00 2001 From: smellthemoon <64083300+smellthemoon@users.noreply.github.com> Date: Mon, 12 Dec 2022 18:43:23 +0800 Subject: [PATCH] Fix load timeout (#21156) Signed-off-by: lixinguo Signed-off-by: lixinguo Co-authored-by: lixinguo --- internal/querycoordv2/observers/collection_observer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/querycoordv2/observers/collection_observer.go b/internal/querycoordv2/observers/collection_observer.go index bcea536847..cfb0764e7e 100644 --- a/internal/querycoordv2/observers/collection_observer.go +++ b/internal/querycoordv2/observers/collection_observer.go @@ -138,7 +138,6 @@ func (ob *CollectionObserver) observeLoadStatus() { collections := ob.meta.CollectionManager.GetAllCollections() for _, collection := range collections { if collection.LoadPercentage == 100 { - delete(ob.collectionLoadedCount, collection.GetCollectionID()) continue } ob.observeCollectionLoadStatus(collection) @@ -150,7 +149,6 @@ func (ob *CollectionObserver) observeLoadStatus() { } for _, partition := range partitions { if partition.LoadPercentage == 100 { - delete(ob.partitionLoadedCount, partition.GetPartitionID()) continue } ob.observePartitionLoadStatus(partition) @@ -204,6 +202,7 @@ func (ob *CollectionObserver) observeCollectionLoadStatus(collection *meta.Colle } ob.collectionLoadedCount[collection.GetCollectionID()] = loadedCount if updated.LoadPercentage == 100 { + delete(ob.collectionLoadedCount, collection.GetCollectionID()) ob.targetMgr.UpdateCollectionCurrentTarget(updated.CollectionID) updated.Status = querypb.LoadStatus_Loaded ob.meta.CollectionManager.UpdateCollection(updated) @@ -267,6 +266,7 @@ func (ob *CollectionObserver) observePartitionLoadStatus(partition *meta.Partiti } ob.partitionLoadedCount[partition.GetPartitionID()] = loadedCount if updated.LoadPercentage == 100 { + delete(ob.partitionLoadedCount, partition.GetPartitionID()) ob.targetMgr.UpdateCollectionCurrentTarget(partition.GetCollectionID(), partition.GetPartitionID()) updated.Status = querypb.LoadStatus_Loaded ob.meta.CollectionManager.PutPartition(updated)