diff --git a/internal/datacoord/compaction.go b/internal/datacoord/compaction.go index 819699c8f1..c2ad9ae726 100644 --- a/internal/datacoord/compaction.go +++ b/internal/datacoord/compaction.go @@ -534,9 +534,6 @@ func (c *compactionPlanHandler) getCompactionTask(planID int64) CompactionTask { func (c *compactionPlanHandler) enqueueCompaction(task *datapb.CompactionTask) error { log := log.With(zap.Int64("planID", task.GetPlanID()), zap.Int64("triggerID", task.GetTriggerID()), zap.Int64("collectionID", task.GetCollectionID()), zap.String("type", task.GetType().String())) - if c.isFull() { - return errCompactionBusy - } t, err := c.createCompactTask(task) if err != nil { return err diff --git a/internal/datacoord/compaction_test.go b/internal/datacoord/compaction_test.go index ea5d41e58b..fb31c7611b 100644 --- a/internal/datacoord/compaction_test.go +++ b/internal/datacoord/compaction_test.go @@ -528,7 +528,7 @@ func (s *CompactionPlanHandlerSuite) TestGetCompactionTask() { func (s *CompactionPlanHandlerSuite) TestExecCompactionPlan() { s.SetupTest() - s.mockMeta.EXPECT().CheckAndSetSegmentsCompacting(mock.Anything).Return(true, true).Once() + s.mockMeta.EXPECT().CheckAndSetSegmentsCompacting(mock.Anything).Return(true, true).Maybe() s.mockMeta.EXPECT().SaveCompactionTask(mock.Anything).Return(nil) handler := newCompactionPlanHandler(nil, s.mockSessMgr, s.mockCm, s.mockMeta, s.mockAlloc, nil, nil) @@ -545,7 +545,7 @@ func (s *CompactionPlanHandlerSuite) TestExecCompactionPlan() { s.handler.taskNumber.Add(1000) task.PlanID = 2 err = s.handler.enqueueCompaction(task) - s.Error(err) + s.NoError(err) } func (s *CompactionPlanHandlerSuite) TestCheckCompaction() {