Skip to content

Fix DNS watcher from clearing known endpoints on lookup failure#7698

Merged
danielblando merged 5 commits into
cortexproject:masterfrom
Wassup789:fix-dnsresolver-address-cleaning
Jul 20, 2026
Merged

Fix DNS watcher from clearing known endpoints on lookup failure#7698
danielblando merged 5 commits into
cortexproject:masterfrom
Wassup789:fix-dnsresolver-address-cleaning

Conversation

@Wassup789

@Wassup789 Wassup789 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

What this PR does:

Components like the querier and query-frontend use the DNSWatcher to handle resolution of addresses. When DNS lookups fail (due to an issue on the DNS server, for instance), the resolved address set is set to nil, which sends a Delete for every previously known address.

This PR changes the DNSWatcher to retain all previously known addresses during DNS resolution failures, to prevent queriers (for instance) from clearing all known DNS records.

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
  • docs/configuration/v1-guarantees.md updated if this PR introduces experimental flags

Signed-off-by: Wilson La <wilsnlaa@amazon.com>
@dosubot dosubot Bot added go Pull requests that update Go code type/bug labels Jul 17, 2026
Signed-off-by: Wilson La <wilsnlaa@amazon.com>
Signed-off-by: Wilson La <wilsnlaa@amazon.com>

@friedrichg friedrichg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!. minor nit on the changelog

Comment thread CHANGELOG.md Outdated
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jul 20, 2026

@SungJin1212 SungJin1212 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Wassup789 and others added 2 commits July 20, 2026 08:33
Co-authored-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com>
Signed-off-by: Wilson La <git@wilsonla.ca>
Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com>
@danielblando
danielblando merged commit 6626557 into cortexproject:master Jul 20, 2026
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go Pull requests that update Go code lgtm This PR has been approved by a maintainer size/M type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants