Skip to content

Commit

Permalink
enhance:Improve load speed (#32898)
Browse files Browse the repository at this point in the history
fix #32897
add memory check when load collection

Signed-off-by: xiaofanluan <xiaofan.luan@zilliz.com>
  • Loading branch information
xiaofan-luan committed May 11, 2024
1 parent c0e62e6 commit b044e55
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/querycoordv2/observers/collection_observer.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ func (ob *CollectionObserver) LoadCollection(ctx context.Context, collectionID i
}

ob.loadTasks.Insert(key, LoadTask{LoadType: querypb.LoadType_LoadCollection, CollectionID: collectionID})
ob.checkerController.Check()
}

func (ob *CollectionObserver) LoadPartitions(ctx context.Context, collectionID int64, partitionIDs []int64) {
Expand All @@ -140,6 +141,7 @@ func (ob *CollectionObserver) LoadPartitions(ctx context.Context, collectionID i
}

ob.loadTasks.Insert(key, LoadTask{LoadType: querypb.LoadType_LoadPartition, CollectionID: collectionID, PartitionIDs: partitionIDs})
ob.checkerController.Check()
}

func (ob *CollectionObserver) Observe(ctx context.Context) {
Expand Down

0 comments on commit b044e55

Please sign in to comment.