Skip to content

Conversation

@kezhenxu94
Copy link
Member

Background: The existing logic tries to wait for the first DNS resolution before putting it into the map, but in the case where the DNS is not resolvable at all, it won’t be put in the map and thus each call to the cache will perform a DNS resolution, this can consume all the memory and causes other unrelated threads to fail due to memory pressure.

This PR do the following things:

  • Put the DNS resolution task to the cache map without waiting for the first result, when the DNS is not resolvable at all, no new task will be created.

  • Check if the task is completed, try to get the resolved IPs only when then task is completed.

  • Set max attempts to the DNS resolution, if it failed to resolve the DNS for 3 times, it stop trying.

  • If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #. NO

  • Update the CHANGES log.

@wu-sheng wu-sheng added this to the 10.3.0 milestone May 9, 2025
@wu-sheng wu-sheng added the bug Something isn't working and you are sure it's a bug! label May 9, 2025
@wu-sheng wu-sheng merged commit 3739add into apache:master May 9, 2025
164 of 165 checks passed
@kezhenxu94 kezhenxu94 deleted the istioregistry branch May 9, 2025 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working and you are sure it's a bug!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants