pjfanning opened a new pull request, #3549: URL: https://github.com/apache/pekko/pull/3549
### Motivation Port of akka/akka-core#32114 (backport of akka/akka#32110). That fix addressed `AsyncDnsResolver` leaving failed resolutions in its in-flight map, which blocked any later resolve of the same name with a stale failure. Pekko's resolver already clears the in-flight entry on failure: #2919 ported Akka's later `DnsResolutionActor` rewrite, whose `ResolutionAnswer` handler fans a `Failure` out to every waiter and then removes the `(name, mode)` entry unconditionally. So the production-side change is not needed here, but the regression test was missing. ### Modification Add an `AsyncDnsResolverSpec` case: two senders resolve the same name, the second joins the in-flight resolution (no second question is sent), the DNS client replies with a failure, both senders receive `Status.Failure`, and a subsequent resolve from both senders is sent to the client again and succeeds. The Akka test relies on a 1 ms `resolve-timeout` and an autopilot that ignores the first question. This port drives the client `TestProbe` explicitly instead (same style as the existing "reuse in-progress resolutions" case) so it has no timing dependency. ### Result The retry-after-failure behaviour of `AsyncDnsResolver` is covered by a test. No main-code change. ### Tests - `sbt "actor-tests/testOnly org.apache.pekko.io.dns.internal.AsyncDnsResolverSpec"` - 22 passed, run 3 times - native scalafmt run on the changed file ### References None - port of akka/akka-core#32114 (test only; the fix was already present via #2919). Akka source is Apache-2.0 licensed as of 2023-09-20. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
