You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "He-Pin (via GitHub)" <gi...@apache.org> on 2023/04/14 18:53:33 UTC

[GitHub] [incubator-pekko] He-Pin opened a new pull request, #288: =act Refactory AsyncDnsResolver to fix the race condition of `nextId()`

He-Pin opened a new pull request, #288:
URL: https://github.com/apache/incubator-pekko/pull/288

   The issue was first reported in akka/akka.
   The `nextId()` can be called from different threads.


-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] mdedetrich commented on pull request #288: =act Refactory AsyncDnsResolver to fix the race condition of `nextId()`

Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on PR #288:
URL: https://github.com/apache/incubator-pekko/pull/288#issuecomment-1563055271

   I think the committers (definitely myself) are a bit busy/anxious about getting a release out soon so if its not a big deal I would prefer if we look into this after the first release. My attention is already stretched pretty thin so after a release of Pekko I should be able to focus on issues like this a lot more.


-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] He-Pin commented on pull request #288: =act Refactory AsyncDnsResolver to fix the race condition of `nextId()`

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on PR #288:
URL: https://github.com/apache/incubator-pekko/pull/288#issuecomment-1509136062

   It passed on my pc, will check.


-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] pjfanning commented on a diff in pull request #288: =act Refactory AsyncDnsResolver to fix the race condition of `nextId()`

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #288:
URL: https://github.com/apache/incubator-pekko/pull/288#discussion_r1167202012


##########
actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsResolver.scala:
##########
@@ -47,110 +46,149 @@ private[io] final class AsyncDnsResolver(
 
   import AsyncDnsResolver._
 
-  implicit val ec: ExecutionContextExecutor = context.dispatcher
+  initCache(cache)
 
-  // avoid ever looking up localhost by pre-populating cache
-  {
-    val loopback = InetAddress.getLoopbackAddress
-    val (ipv4Address, ipv6Address) = loopback match {
-      case ipv6: Inet6Address => (InetAddress.getByName("127.0.0.1"), ipv6)
-      case ipv4: Inet4Address => (ipv4, InetAddress.getByName("::1"))
-      case unknown            => throw new IllegalArgumentException(s"Loopback address was [$unknown]")
-    }
-    cache.put(
-      "localhost" -> Ip(),
-      DnsProtocol.Resolved("localhost", ARecord("localhost", Ttl.effectivelyForever, loopback) :: Nil),
-      Ttl.effectivelyForever)
-    cache.put(
-      "localhost" -> Ip(ipv6 = false, ipv4 = true),
-      DnsProtocol.Resolved("localhost", ARecord("localhost", Ttl.effectivelyForever, ipv4Address) :: Nil),
-      Ttl.effectivelyForever)
-    cache.put(
-      "localhost" -> Ip(ipv6 = true, ipv4 = false),
-      DnsProtocol.Resolved("localhost", ARecord("localhost", Ttl.effectivelyForever, ipv6Address) :: Nil),
-      Ttl.effectivelyForever)
-
-  }
-
-  // For ask to DNS Client
-  implicit val timeout: Timeout = Timeout(settings.ResolveTimeout)
-
-  val nameServers = settings.NameServers
-
-  val positiveCachePolicy = settings.PositiveCachePolicy
-  val negativeCachePolicy = settings.NegativeCachePolicy
   log.debug(
     "Using name servers [{}] and search domains [{}] with ndots={}",
-    nameServers,
+    settings.NameServers,
     settings.SearchDomains,
     settings.NDots)
 
-  private var requestId: Short = 0
-
-  private def nextId(): Short = {
-    requestId = (requestId + 1).toShort
-    requestId
-  }

Review Comment:
   is there a test case that shows this?
   
   I'm broadly supportive of fixing this - but I am wondering if a singleton actor instance would be a more actor based solution. Actor instances show only be processing 1 message at a time.



-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] He-Pin commented on pull request #288: =act Refactory AsyncDnsResolver to fix the race condition of `nextId()`

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on PR #288:
URL: https://github.com/apache/incubator-pekko/pull/288#issuecomment-1561752421

   > @kerr this is looking unlikely to get into the 1.0.0 release. Can we delay this to the 1.1.0 release?
   
   I'm fine, but this is a known issue, let's roll out the first release then.


-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] He-Pin commented on pull request #288: =act Refactory AsyncDnsResolver to fix the race condition of `nextId()`

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on PR #288:
URL: https://github.com/apache/incubator-pekko/pull/288#issuecomment-1563739920

   @mdedetrich Then let's defer this


-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] pjfanning commented on pull request #288: =act Refactory AsyncDnsResolver to fix the race condition of `nextId()`

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #288:
URL: https://github.com/apache/incubator-pekko/pull/288#issuecomment-1591852197

   @He-Pin is there anything in this PR that we need to add to the code merged for #385 ?


-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] He-Pin commented on a diff in pull request #288: =act Refactory AsyncDnsResolver to fix the race condition of `nextId()`

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on code in PR #288:
URL: https://github.com/apache/incubator-pekko/pull/288#discussion_r1167199031


##########
actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsResolver.scala:
##########
@@ -47,110 +48,150 @@ private[io] final class AsyncDnsResolver(
 
   import AsyncDnsResolver._
 
-  implicit val ec: ExecutionContextExecutor = context.dispatcher
+  initCache(cache)
 
-  // avoid ever looking up localhost by pre-populating cache
-  {
-    val loopback = InetAddress.getLoopbackAddress
-    val (ipv4Address, ipv6Address) = loopback match {
-      case ipv6: Inet6Address => (InetAddress.getByName("127.0.0.1"), ipv6)
-      case ipv4: Inet4Address => (ipv4, InetAddress.getByName("::1"))
-      case unknown            => throw new IllegalArgumentException(s"Loopback address was [$unknown]")
-    }
-    cache.put(
-      "localhost" -> Ip(),
-      DnsProtocol.Resolved("localhost", ARecord("localhost", Ttl.effectivelyForever, loopback) :: Nil),
-      Ttl.effectivelyForever)
-    cache.put(
-      "localhost" -> Ip(ipv6 = false, ipv4 = true),
-      DnsProtocol.Resolved("localhost", ARecord("localhost", Ttl.effectivelyForever, ipv4Address) :: Nil),
-      Ttl.effectivelyForever)
-    cache.put(
-      "localhost" -> Ip(ipv6 = true, ipv4 = false),
-      DnsProtocol.Resolved("localhost", ARecord("localhost", Ttl.effectivelyForever, ipv6Address) :: Nil),
-      Ttl.effectivelyForever)
-
-  }
-
-  // For ask to DNS Client
-  implicit val timeout: Timeout = Timeout(settings.ResolveTimeout)
-
-  val nameServers = settings.NameServers
-
-  val positiveCachePolicy = settings.PositiveCachePolicy
-  val negativeCachePolicy = settings.NegativeCachePolicy
   log.debug(
     "Using name servers [{}] and search domains [{}] with ndots={}",
-    nameServers,
+    settings.NameServers,
     settings.SearchDomains,
     settings.NDots)
 
-  private var requestId: Short = 0
-
-  private def nextId(): Short = {
-    requestId = (requestId + 1).toShort
-    requestId
-  }
-
-  private val resolvers: List[ActorRef] = clientFactory(context, nameServers)
+  private val resolvers: List[ActorRef] = clientFactory(context, settings.NameServers)
 
   // only supports DnsProtocol, not the deprecated Dns protocol
   // AsyncDnsManager converts between the protocols to support the deprecated protocol
   override def receive: Receive = {
-    case DnsProtocol.Resolve(name, mode) =>
-      cache.get((name, mode)) match {
-        case Some(resolved) =>
-          log.debug("{} cached {}", mode, resolved)
-          sender() ! resolved
-        case None =>
-          resolveWithResolvers(name, mode, resolvers)
-            .map { resolved =>
-              if (resolved.records.nonEmpty) {
-                val minTtl = (positiveCachePolicy +: resolved.records.map(_.ttl)).min
-                cache.put((name, mode), resolved, minTtl)
-              } else if (negativeCachePolicy != Never) cache.put((name, mode), resolved, negativeCachePolicy)
-              log.debug(s"{} resolved {}", mode, resolved)
-              resolved
-            }
-            .pipeTo(sender())
-      }
+    case DnsProtocol.Resolve(name, requestType) =>
+      implicit val ex: ExecutionContext = ExecutionContexts.parasitic
+      resolve(settings, name, requestType, resolvers, cache, log)
+        .pipeTo(sender())
+  }
+}
+
+/**
+ * INTERNAL API
+ */
+@InternalApi
+private[pekko] object AsyncDnsResolver {
+
+  private val ipv4Address =
+    """^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$""".r
+
+  private val ipv6Address =
+    """^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((
 25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$""".r
+
+  private[pekko] def isIpv4Address(name: String): Boolean =
+    ipv4Address.findAllMatchIn(name).nonEmpty
+
+  private[pekko] def isIpv6Address(name: String): Boolean =
+    ipv6Address.findAllMatchIn(name).nonEmpty
+
+  private def isInetAddress(name: String): Boolean =
+    isIpv4Address(name) || isIpv6Address(name)
+
+  private val Empty =
+    Future.successful(Answer(-1, immutable.Seq.empty[ResourceRecord], immutable.Seq.empty[ResourceRecord]))
+
+  case class ResolveFailedException(msg: String) extends Exception(msg)
+
+  private val requestIdGen: AtomicInteger = new AtomicInteger(0)
+
+  private def nextId(): Short = requestIdGen.updateAndGet { current =>
+    if (current == Short.MaxValue) {
+      Short.MinValue
+    } else {
+      current + 1
+    }
+  }.toShort

Review Comment:
   Make use of AtomicInteger as it is not inside the actor now.



-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] He-Pin closed pull request #288: =act Refactory AsyncDnsResolver to fix the race condition of `nextId()`

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin closed pull request #288: =act Refactory AsyncDnsResolver to fix the race condition of `nextId()`
URL: https://github.com/apache/incubator-pekko/pull/288


-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] He-Pin commented on pull request #288: =act Refactory AsyncDnsResolver to fix the race condition of `nextId()`

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on PR #288:
URL: https://github.com/apache/incubator-pekko/pull/288#issuecomment-1592237754

   @pjfanning I think this once can be closed now.


-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] He-Pin commented on a diff in pull request #288: =act Refactory AsyncDnsResolver to fix the race condition of `nextId()`

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on code in PR #288:
URL: https://github.com/apache/incubator-pekko/pull/288#discussion_r1167186443


##########
actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsResolver.scala:
##########
@@ -47,110 +46,149 @@ private[io] final class AsyncDnsResolver(
 
   import AsyncDnsResolver._
 
-  implicit val ec: ExecutionContextExecutor = context.dispatcher
+  initCache(cache)
 
-  // avoid ever looking up localhost by pre-populating cache
-  {
-    val loopback = InetAddress.getLoopbackAddress
-    val (ipv4Address, ipv6Address) = loopback match {
-      case ipv6: Inet6Address => (InetAddress.getByName("127.0.0.1"), ipv6)
-      case ipv4: Inet4Address => (ipv4, InetAddress.getByName("::1"))
-      case unknown            => throw new IllegalArgumentException(s"Loopback address was [$unknown]")
-    }
-    cache.put(
-      "localhost" -> Ip(),
-      DnsProtocol.Resolved("localhost", ARecord("localhost", Ttl.effectivelyForever, loopback) :: Nil),
-      Ttl.effectivelyForever)
-    cache.put(
-      "localhost" -> Ip(ipv6 = false, ipv4 = true),
-      DnsProtocol.Resolved("localhost", ARecord("localhost", Ttl.effectivelyForever, ipv4Address) :: Nil),
-      Ttl.effectivelyForever)
-    cache.put(
-      "localhost" -> Ip(ipv6 = true, ipv4 = false),
-      DnsProtocol.Resolved("localhost", ARecord("localhost", Ttl.effectivelyForever, ipv6Address) :: Nil),
-      Ttl.effectivelyForever)
-
-  }
-
-  // For ask to DNS Client
-  implicit val timeout: Timeout = Timeout(settings.ResolveTimeout)
-
-  val nameServers = settings.NameServers
-
-  val positiveCachePolicy = settings.PositiveCachePolicy
-  val negativeCachePolicy = settings.NegativeCachePolicy
   log.debug(
     "Using name servers [{}] and search domains [{}] with ndots={}",
-    nameServers,
+    settings.NameServers,
     settings.SearchDomains,
     settings.NDots)
 
-  private var requestId: Short = 0
-
-  private def nextId(): Short = {
-    requestId = (requestId + 1).toShort
-    requestId
-  }

Review Comment:
   This method can be called from different threads.



-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] He-Pin commented on a diff in pull request #288: =act Refactory AsyncDnsResolver to fix the race condition of `nextId()`

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on code in PR #288:
URL: https://github.com/apache/incubator-pekko/pull/288#discussion_r1167219633


##########
actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsResolver.scala:
##########
@@ -47,110 +46,149 @@ private[io] final class AsyncDnsResolver(
 
   import AsyncDnsResolver._
 
-  implicit val ec: ExecutionContextExecutor = context.dispatcher
+  initCache(cache)
 
-  // avoid ever looking up localhost by pre-populating cache
-  {
-    val loopback = InetAddress.getLoopbackAddress
-    val (ipv4Address, ipv6Address) = loopback match {
-      case ipv6: Inet6Address => (InetAddress.getByName("127.0.0.1"), ipv6)
-      case ipv4: Inet4Address => (ipv4, InetAddress.getByName("::1"))
-      case unknown            => throw new IllegalArgumentException(s"Loopback address was [$unknown]")
-    }
-    cache.put(
-      "localhost" -> Ip(),
-      DnsProtocol.Resolved("localhost", ARecord("localhost", Ttl.effectivelyForever, loopback) :: Nil),
-      Ttl.effectivelyForever)
-    cache.put(
-      "localhost" -> Ip(ipv6 = false, ipv4 = true),
-      DnsProtocol.Resolved("localhost", ARecord("localhost", Ttl.effectivelyForever, ipv4Address) :: Nil),
-      Ttl.effectivelyForever)
-    cache.put(
-      "localhost" -> Ip(ipv6 = true, ipv4 = false),
-      DnsProtocol.Resolved("localhost", ARecord("localhost", Ttl.effectivelyForever, ipv6Address) :: Nil),
-      Ttl.effectivelyForever)
-
-  }
-
-  // For ask to DNS Client
-  implicit val timeout: Timeout = Timeout(settings.ResolveTimeout)
-
-  val nameServers = settings.NameServers
-
-  val positiveCachePolicy = settings.PositiveCachePolicy
-  val negativeCachePolicy = settings.NegativeCachePolicy
   log.debug(
     "Using name servers [{}] and search domains [{}] with ndots={}",
-    nameServers,
+    settings.NameServers,
     settings.SearchDomains,
     settings.NDots)
 
-  private var requestId: Short = 0
-
-  private def nextId(): Short = {
-    requestId = (requestId + 1).toShort
-    requestId
-  }

Review Comment:
   Yes, but the SimpleDnsCache is threadSafe so I think that would be a little heavy, maybe a FunctionRef is more lightweight



-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] He-Pin commented on a diff in pull request #288: =act Refactory AsyncDnsResolver to fix the race condition of `nextId()`

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on code in PR #288:
URL: https://github.com/apache/incubator-pekko/pull/288#discussion_r1167197502


##########
actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsResolver.scala:
##########
@@ -47,110 +48,150 @@ private[io] final class AsyncDnsResolver(
 
   import AsyncDnsResolver._
 
-  implicit val ec: ExecutionContextExecutor = context.dispatcher
+  initCache(cache)
 
-  // avoid ever looking up localhost by pre-populating cache
-  {
-    val loopback = InetAddress.getLoopbackAddress
-    val (ipv4Address, ipv6Address) = loopback match {
-      case ipv6: Inet6Address => (InetAddress.getByName("127.0.0.1"), ipv6)
-      case ipv4: Inet4Address => (ipv4, InetAddress.getByName("::1"))
-      case unknown            => throw new IllegalArgumentException(s"Loopback address was [$unknown]")
-    }
-    cache.put(
-      "localhost" -> Ip(),
-      DnsProtocol.Resolved("localhost", ARecord("localhost", Ttl.effectivelyForever, loopback) :: Nil),
-      Ttl.effectivelyForever)
-    cache.put(
-      "localhost" -> Ip(ipv6 = false, ipv4 = true),
-      DnsProtocol.Resolved("localhost", ARecord("localhost", Ttl.effectivelyForever, ipv4Address) :: Nil),
-      Ttl.effectivelyForever)
-    cache.put(
-      "localhost" -> Ip(ipv6 = true, ipv4 = false),
-      DnsProtocol.Resolved("localhost", ARecord("localhost", Ttl.effectivelyForever, ipv6Address) :: Nil),
-      Ttl.effectivelyForever)
-
-  }
-
-  // For ask to DNS Client
-  implicit val timeout: Timeout = Timeout(settings.ResolveTimeout)
-
-  val nameServers = settings.NameServers
-
-  val positiveCachePolicy = settings.PositiveCachePolicy
-  val negativeCachePolicy = settings.NegativeCachePolicy
   log.debug(
     "Using name servers [{}] and search domains [{}] with ndots={}",
-    nameServers,
+    settings.NameServers,
     settings.SearchDomains,
     settings.NDots)
 
-  private var requestId: Short = 0
-
-  private def nextId(): Short = {
-    requestId = (requestId + 1).toShort
-    requestId
-  }
-
-  private val resolvers: List[ActorRef] = clientFactory(context, nameServers)
+  private val resolvers: List[ActorRef] = clientFactory(context, settings.NameServers)
 
   // only supports DnsProtocol, not the deprecated Dns protocol
   // AsyncDnsManager converts between the protocols to support the deprecated protocol
   override def receive: Receive = {
-    case DnsProtocol.Resolve(name, mode) =>
-      cache.get((name, mode)) match {
-        case Some(resolved) =>
-          log.debug("{} cached {}", mode, resolved)
-          sender() ! resolved
-        case None =>
-          resolveWithResolvers(name, mode, resolvers)
-            .map { resolved =>
-              if (resolved.records.nonEmpty) {
-                val minTtl = (positiveCachePolicy +: resolved.records.map(_.ttl)).min
-                cache.put((name, mode), resolved, minTtl)
-              } else if (negativeCachePolicy != Never) cache.put((name, mode), resolved, negativeCachePolicy)
-              log.debug(s"{} resolved {}", mode, resolved)
-              resolved
-            }
-            .pipeTo(sender())
-      }
+    case DnsProtocol.Resolve(name, requestType) =>
+      implicit val ex: ExecutionContext = ExecutionContexts.parasitic
+      resolve(settings, name, requestType, resolvers, cache, log)
+        .pipeTo(sender())
+  }
+}
+
+/**
+ * INTERNAL API
+ */
+@InternalApi
+private[pekko] object AsyncDnsResolver {
+
+  private val ipv4Address =
+    """^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$""".r
+
+  private val ipv6Address =
+    """^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((
 25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$""".r
+
+  private[pekko] def isIpv4Address(name: String): Boolean =
+    ipv4Address.findAllMatchIn(name).nonEmpty
+
+  private[pekko] def isIpv6Address(name: String): Boolean =
+    ipv6Address.findAllMatchIn(name).nonEmpty
+
+  private def isInetAddress(name: String): Boolean =
+    isIpv4Address(name) || isIpv6Address(name)
+
+  private val Empty =
+    Future.successful(Answer(-1, immutable.Seq.empty[ResourceRecord], immutable.Seq.empty[ResourceRecord]))
+
+  case class ResolveFailedException(msg: String) extends Exception(msg)
+
+  private val requestIdGen: AtomicInteger = new AtomicInteger(0)
+
+  private def nextId(): Short = requestIdGen.updateAndGet { current =>
+    if (current == Short.MaxValue) {
+      Short.MinValue
+    } else {
+      current + 1
+    }
+  }.toShort
+
+  private def resolve(
+      settings: DnsSettings,
+      name: String,
+      requestType: RequestType,
+      resolvers: List[ActorRef],
+      cache: SimpleDnsCache,
+      log: LoggingAdapter): Future[DnsProtocol.Resolved] = {
+    cache.get((name, requestType)) match {
+      case Some(resolved) =>
+        log.debug("{} cached {}", requestType, resolved)
+        Future.successful(resolved)
+      case None => resolveWithResolvers(settings, name, requestType, resolvers, cache, log)

Review Comment:
   There may have multi queries in the fight if the cache is missed as it was



-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] He-Pin commented on a diff in pull request #288: =act Refactory AsyncDnsResolver to fix the race condition of `nextId()`

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on code in PR #288:
URL: https://github.com/apache/incubator-pekko/pull/288#discussion_r1167197502


##########
actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsResolver.scala:
##########
@@ -47,110 +48,150 @@ private[io] final class AsyncDnsResolver(
 
   import AsyncDnsResolver._
 
-  implicit val ec: ExecutionContextExecutor = context.dispatcher
+  initCache(cache)
 
-  // avoid ever looking up localhost by pre-populating cache
-  {
-    val loopback = InetAddress.getLoopbackAddress
-    val (ipv4Address, ipv6Address) = loopback match {
-      case ipv6: Inet6Address => (InetAddress.getByName("127.0.0.1"), ipv6)
-      case ipv4: Inet4Address => (ipv4, InetAddress.getByName("::1"))
-      case unknown            => throw new IllegalArgumentException(s"Loopback address was [$unknown]")
-    }
-    cache.put(
-      "localhost" -> Ip(),
-      DnsProtocol.Resolved("localhost", ARecord("localhost", Ttl.effectivelyForever, loopback) :: Nil),
-      Ttl.effectivelyForever)
-    cache.put(
-      "localhost" -> Ip(ipv6 = false, ipv4 = true),
-      DnsProtocol.Resolved("localhost", ARecord("localhost", Ttl.effectivelyForever, ipv4Address) :: Nil),
-      Ttl.effectivelyForever)
-    cache.put(
-      "localhost" -> Ip(ipv6 = true, ipv4 = false),
-      DnsProtocol.Resolved("localhost", ARecord("localhost", Ttl.effectivelyForever, ipv6Address) :: Nil),
-      Ttl.effectivelyForever)
-
-  }
-
-  // For ask to DNS Client
-  implicit val timeout: Timeout = Timeout(settings.ResolveTimeout)
-
-  val nameServers = settings.NameServers
-
-  val positiveCachePolicy = settings.PositiveCachePolicy
-  val negativeCachePolicy = settings.NegativeCachePolicy
   log.debug(
     "Using name servers [{}] and search domains [{}] with ndots={}",
-    nameServers,
+    settings.NameServers,
     settings.SearchDomains,
     settings.NDots)
 
-  private var requestId: Short = 0
-
-  private def nextId(): Short = {
-    requestId = (requestId + 1).toShort
-    requestId
-  }
-
-  private val resolvers: List[ActorRef] = clientFactory(context, nameServers)
+  private val resolvers: List[ActorRef] = clientFactory(context, settings.NameServers)
 
   // only supports DnsProtocol, not the deprecated Dns protocol
   // AsyncDnsManager converts between the protocols to support the deprecated protocol
   override def receive: Receive = {
-    case DnsProtocol.Resolve(name, mode) =>
-      cache.get((name, mode)) match {
-        case Some(resolved) =>
-          log.debug("{} cached {}", mode, resolved)
-          sender() ! resolved
-        case None =>
-          resolveWithResolvers(name, mode, resolvers)
-            .map { resolved =>
-              if (resolved.records.nonEmpty) {
-                val minTtl = (positiveCachePolicy +: resolved.records.map(_.ttl)).min
-                cache.put((name, mode), resolved, minTtl)
-              } else if (negativeCachePolicy != Never) cache.put((name, mode), resolved, negativeCachePolicy)
-              log.debug(s"{} resolved {}", mode, resolved)
-              resolved
-            }
-            .pipeTo(sender())
-      }
+    case DnsProtocol.Resolve(name, requestType) =>
+      implicit val ex: ExecutionContext = ExecutionContexts.parasitic
+      resolve(settings, name, requestType, resolvers, cache, log)
+        .pipeTo(sender())
+  }
+}
+
+/**
+ * INTERNAL API
+ */
+@InternalApi
+private[pekko] object AsyncDnsResolver {
+
+  private val ipv4Address =
+    """^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$""".r
+
+  private val ipv6Address =
+    """^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((
 25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$""".r
+
+  private[pekko] def isIpv4Address(name: String): Boolean =
+    ipv4Address.findAllMatchIn(name).nonEmpty
+
+  private[pekko] def isIpv6Address(name: String): Boolean =
+    ipv6Address.findAllMatchIn(name).nonEmpty
+
+  private def isInetAddress(name: String): Boolean =
+    isIpv4Address(name) || isIpv6Address(name)
+
+  private val Empty =
+    Future.successful(Answer(-1, immutable.Seq.empty[ResourceRecord], immutable.Seq.empty[ResourceRecord]))
+
+  case class ResolveFailedException(msg: String) extends Exception(msg)
+
+  private val requestIdGen: AtomicInteger = new AtomicInteger(0)
+
+  private def nextId(): Short = requestIdGen.updateAndGet { current =>
+    if (current == Short.MaxValue) {
+      Short.MinValue
+    } else {
+      current + 1
+    }
+  }.toShort
+
+  private def resolve(
+      settings: DnsSettings,
+      name: String,
+      requestType: RequestType,
+      resolvers: List[ActorRef],
+      cache: SimpleDnsCache,
+      log: LoggingAdapter): Future[DnsProtocol.Resolved] = {
+    cache.get((name, requestType)) match {
+      case Some(resolved) =>
+        log.debug("{} cached {}", requestType, resolved)
+        Future.successful(resolved)
+      case None => resolveWithResolvers(settings, name, requestType, resolvers, cache, log)

Review Comment:
   There will have multi queries in the fight if the cache is missed as it was.



-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] He-Pin commented on a diff in pull request #288: =act Refactory AsyncDnsResolver to fix the race condition of `nextId()`

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on code in PR #288:
URL: https://github.com/apache/incubator-pekko/pull/288#discussion_r1167199031


##########
actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsResolver.scala:
##########
@@ -47,110 +48,150 @@ private[io] final class AsyncDnsResolver(
 
   import AsyncDnsResolver._
 
-  implicit val ec: ExecutionContextExecutor = context.dispatcher
+  initCache(cache)
 
-  // avoid ever looking up localhost by pre-populating cache
-  {
-    val loopback = InetAddress.getLoopbackAddress
-    val (ipv4Address, ipv6Address) = loopback match {
-      case ipv6: Inet6Address => (InetAddress.getByName("127.0.0.1"), ipv6)
-      case ipv4: Inet4Address => (ipv4, InetAddress.getByName("::1"))
-      case unknown            => throw new IllegalArgumentException(s"Loopback address was [$unknown]")
-    }
-    cache.put(
-      "localhost" -> Ip(),
-      DnsProtocol.Resolved("localhost", ARecord("localhost", Ttl.effectivelyForever, loopback) :: Nil),
-      Ttl.effectivelyForever)
-    cache.put(
-      "localhost" -> Ip(ipv6 = false, ipv4 = true),
-      DnsProtocol.Resolved("localhost", ARecord("localhost", Ttl.effectivelyForever, ipv4Address) :: Nil),
-      Ttl.effectivelyForever)
-    cache.put(
-      "localhost" -> Ip(ipv6 = true, ipv4 = false),
-      DnsProtocol.Resolved("localhost", ARecord("localhost", Ttl.effectivelyForever, ipv6Address) :: Nil),
-      Ttl.effectivelyForever)
-
-  }
-
-  // For ask to DNS Client
-  implicit val timeout: Timeout = Timeout(settings.ResolveTimeout)
-
-  val nameServers = settings.NameServers
-
-  val positiveCachePolicy = settings.PositiveCachePolicy
-  val negativeCachePolicy = settings.NegativeCachePolicy
   log.debug(
     "Using name servers [{}] and search domains [{}] with ndots={}",
-    nameServers,
+    settings.NameServers,
     settings.SearchDomains,
     settings.NDots)
 
-  private var requestId: Short = 0
-
-  private def nextId(): Short = {
-    requestId = (requestId + 1).toShort
-    requestId
-  }
-
-  private val resolvers: List[ActorRef] = clientFactory(context, nameServers)
+  private val resolvers: List[ActorRef] = clientFactory(context, settings.NameServers)
 
   // only supports DnsProtocol, not the deprecated Dns protocol
   // AsyncDnsManager converts between the protocols to support the deprecated protocol
   override def receive: Receive = {
-    case DnsProtocol.Resolve(name, mode) =>
-      cache.get((name, mode)) match {
-        case Some(resolved) =>
-          log.debug("{} cached {}", mode, resolved)
-          sender() ! resolved
-        case None =>
-          resolveWithResolvers(name, mode, resolvers)
-            .map { resolved =>
-              if (resolved.records.nonEmpty) {
-                val minTtl = (positiveCachePolicy +: resolved.records.map(_.ttl)).min
-                cache.put((name, mode), resolved, minTtl)
-              } else if (negativeCachePolicy != Never) cache.put((name, mode), resolved, negativeCachePolicy)
-              log.debug(s"{} resolved {}", mode, resolved)
-              resolved
-            }
-            .pipeTo(sender())
-      }
+    case DnsProtocol.Resolve(name, requestType) =>
+      implicit val ex: ExecutionContext = ExecutionContexts.parasitic
+      resolve(settings, name, requestType, resolvers, cache, log)
+        .pipeTo(sender())
+  }
+}
+
+/**
+ * INTERNAL API
+ */
+@InternalApi
+private[pekko] object AsyncDnsResolver {
+
+  private val ipv4Address =
+    """^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$""".r
+
+  private val ipv6Address =
+    """^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((
 25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$""".r
+
+  private[pekko] def isIpv4Address(name: String): Boolean =
+    ipv4Address.findAllMatchIn(name).nonEmpty
+
+  private[pekko] def isIpv6Address(name: String): Boolean =
+    ipv6Address.findAllMatchIn(name).nonEmpty
+
+  private def isInetAddress(name: String): Boolean =
+    isIpv4Address(name) || isIpv6Address(name)
+
+  private val Empty =
+    Future.successful(Answer(-1, immutable.Seq.empty[ResourceRecord], immutable.Seq.empty[ResourceRecord]))
+
+  case class ResolveFailedException(msg: String) extends Exception(msg)
+
+  private val requestIdGen: AtomicInteger = new AtomicInteger(0)
+
+  private def nextId(): Short = requestIdGen.updateAndGet { current =>
+    if (current == Short.MaxValue) {
+      Short.MinValue
+    } else {
+      current + 1
+    }
+  }.toShort

Review Comment:
   Make use an AtomicInteger as it not inside the actor now.



-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] pjfanning commented on pull request #288: =act Refactory AsyncDnsResolver to fix the race condition of `nextId()`

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #288:
URL: https://github.com/apache/incubator-pekko/pull/288#issuecomment-1561316396

   @kerr this looking unlikely to get into the 1.0.0 release. Can we delay this to the 1.1.0 release?


-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] He-Pin commented on pull request #288: =act Refactory AsyncDnsResolver to fix the race condition of `nextId()`

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on PR #288:
URL: https://github.com/apache/incubator-pekko/pull/288#issuecomment-1562187035

   @mdedetrich What's your option, I can allocate one day this weekend to work on this. or should we defer this to the next release?


-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org