diff --git a/controller/controller.go b/controller/controller.go index c1979a6c4..a3ef2e8b2 100644 --- a/controller/controller.go +++ b/controller/controller.go @@ -210,13 +210,6 @@ func (c *Controller) RunOnce(ctx context.Context) error { return err } - records = endpoint.RemoveDuplicates(records) - //This deduplication seems to be the a good fit - //Duplicated endpoints were living on this variable - //In all versions for the overlapping zones - //With this in place the change on plan.go is not needed - //Also it saves some rounds of cpu - //Keeping this here until we decide what's best registryEndpointsTotal.Set(float64(len(records))) regARecords, regAAAARecords := countAddressRecords(records) registryARecords.Set(float64(regARecords)) diff --git a/plan/plan.go b/plan/plan.go index 1f913942f..d0ca7f96a 100644 --- a/plan/plan.go +++ b/plan/plan.go @@ -170,20 +170,6 @@ func (p *Plan) Calculate() *Plan { if p.DomainFilter == nil { p.DomainFilter = endpoint.MatchAllDomainFilters(nil) } - // Root cause of the issue: - // Behavior on 0.14.0 on Deletes - // ------------------------------------------------------------------------------------------------------ - // DNSName | Current record | Desired Records (Candidate) | - // ------------------------------------------------------------------------------------------------------ - // dnsname.zone.com |[dnsname.zone.com IN A]dnsname.zone.com IN A (dup ep)| [] | - // ------------------------------------------------------------------------------------------------------ - // - // Behavior on 0.13.6 on Deletes - // ------------------------------------------------------------------------------------------------------ - // DNSName | Current record | Desired Records (Candidate) | - // ------------------------------------------------------------------------------------------------------ - // dnsname.zone.com | [dnsname.zone.com IN CNAME ] | [] | - // ------------------------------------------------------------------------------------------------------ for _, current := range filterRecordsForPlan(p.Current, p.DomainFilter, p.ManagedRecords, p.ExcludeRecords) { t.addCurrent(current) @@ -266,11 +252,7 @@ func (p *Plan) Calculate() *Plan { // filter out updates this external dns does not have ownership claim over if p.OwnerID != "" { changes.Delete = endpoint.FilterEndpointsByOwnerID(p.OwnerID, changes.Delete) - // Remove duplicated endpoints generated by plan.go on Line 210 - // changes.Delete = endpoint.RemoveDuplicates(changes.Delete) - // This was not needed on version 0.13.6, but it seems like - // the old function/code had the ability of removing duplicated endpoints - // While the filterRecordsForPlan and addCurrent functions were running + changes.Delete = endpoint.RemoveDuplicates(changes.Delete) changes.UpdateOld = endpoint.FilterEndpointsByOwnerID(p.OwnerID, changes.UpdateOld) changes.UpdateNew = endpoint.FilterEndpointsByOwnerID(p.OwnerID, changes.UpdateNew) }