spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From squito <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-6980] [CORE] [WIP] Akka timeout excepti...
Date Thu, 11 Jun 2015 19:39:15 GMT
Github user squito commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6205#discussion_r32259238
  
    --- Diff: core/src/main/scala/org/apache/spark/rpc/akka/AkkaRpcEnv.scala ---
    @@ -295,19 +297,20 @@ private[akka] class AkkaRpcEndpointRef(
         actorRef ! AkkaMessage(message, false)
       }
     
    -  override def ask[T: ClassTag](message: Any, timeout: FiniteDuration): Future[T] = {
    -    actorRef.ask(AkkaMessage(message, true))(timeout).flatMap {
    -      // The function will run in the calling thread, so it should be short and never
block.
    -      case msg @ AkkaMessage(message, reply) =>
    -        if (reply) {
    -          logError(s"Receive $msg but the sender cannot reply")
    -          Future.failed(new SparkException(s"Receive $msg but the sender cannot reply"))
    -        } else {
    -          Future.successful(message)
    -        }
    -      case AkkaFailure(e) =>
    -        Future.failed(e)
    -    }(ThreadUtils.sameThread).mapTo[T]
    +  override def ask[T: ClassTag](message: Any, timeout: RpcTimeout): Future[T] = {
    +    actorRef.ask(AkkaMessage(message, true))(timeout.duration).flatMap {
    +        // The function will run in the calling thread, so it should be short and never
block.
    --- End diff --
    
    nit: is this block over-indented?  seems like ti shouldn't be changed at all from before


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message