mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 03:48:37 +08:00
fix: remove isFull check in compaction.enqueue (#34338)
#30633 Signed-off-by: wayblink <anyang.wang@zilliz.com>
This commit is contained in:
parent
2e434e4453
commit
a501fa11c0
@ -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
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user