mirror of https://github.com/milvus-io/milvus.git
Release collection if all partition released (#25706)
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>pull/25764/head
parent
6534396b3d
commit
172db82b23
|
@ -165,9 +165,8 @@ func (job *ReleasePartitionJob) Execute() error {
|
|||
}
|
||||
releasePartitions(job.ctx, job.meta, job.cluster, req.GetCollectionID(), toRelease...)
|
||||
|
||||
// If all partitions are released and LoadType is LoadPartition, clear all
|
||||
if len(toRelease) == len(loadedPartitions) &&
|
||||
job.meta.GetLoadType(req.GetCollectionID()) == querypb.LoadType_LoadPartition {
|
||||
// If all partitions are released, clear all
|
||||
if len(toRelease) == len(loadedPartitions) {
|
||||
log.Info("release partitions covers all partitions, will remove the whole collection")
|
||||
err := job.meta.CollectionManager.RemoveCollection(req.GetCollectionID())
|
||||
if err != nil {
|
||||
|
|
|
@ -1042,7 +1042,7 @@ func (suite *JobSuite) TestDynamicRelease() {
|
|||
err = job.Wait()
|
||||
suite.NoError(err)
|
||||
suite.assertPartitionReleased(col0, p0, p1, p2)
|
||||
suite.True(suite.meta.Exist(col0))
|
||||
suite.False(suite.meta.Exist(col0))
|
||||
|
||||
// loaded: p0, p1, p2
|
||||
// action: release col
|
||||
|
|
Loading…
Reference in New Issue