diff --git a/internal/datacoord/services.go b/internal/datacoord/services.go index 8d1cb9189daf7..ef9b5915398c2 100644 --- a/internal/datacoord/services.go +++ b/internal/datacoord/services.go @@ -639,7 +639,10 @@ func (s *Server) DropVirtualChannel(ctx context.Context, req *datapb.DropVirtual log.Warn("DropVChannel failed to ReleaseAndRemove", zap.String("channel", channel), zap.Error(err)) } s.segmentManager.DropSegmentsOfChannel(ctx, channel) - s.compactionHandler.removeTasksByChannel(channel) + + if !Params.DataCoordCfg.EnableCompaction.GetAsBool() { + s.compactionHandler.removeTasksByChannel(channel) + } metrics.CleanupDataCoordNumStoredRows(collectionID) metrics.DataCoordCheckpointUnixSeconds.DeleteLabelValues(fmt.Sprint(paramtable.GetNodeID()), channel)