spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcelo Vanzin (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SPARK-19347) ReceiverSupervisorImpl can add block to ReceiverTracker multiple times because of askWithRetry
Date Wed, 01 Feb 2017 21:55:52 GMT

     [ https://issues.apache.org/jira/browse/SPARK-19347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Marcelo Vanzin resolved SPARK-19347.
------------------------------------
       Resolution: Fixed
         Assignee: jin xing
    Fix Version/s: 2.2.0

> ReceiverSupervisorImpl can add block to ReceiverTracker multiple times because of askWithRetry
> ----------------------------------------------------------------------------------------------
>
>                 Key: SPARK-19347
>                 URL: https://issues.apache.org/jira/browse/SPARK-19347
>             Project: Spark
>          Issue Type: Bug
>          Components: DStreams, Spark Core
>            Reporter: jin xing
>            Assignee: jin xing
>             Fix For: 2.2.0
>
>
> *ReceiverSupervisorImpl* on executor side reports block's meta back to *ReceiverTracker*
on driver side. In current code, *askWithRetry* is used. However, for *AddBlock*, *ReceiverTracker*
is not idempotent, which may result in messages are processed multiple times.
> To reproduce:
> 1. Check if it is the first time receiving *AddBlock* in *ReceiverTracker*, if so sleep
long enough(say 200 seconds), thus the first RPC call will be timeout in *askWithRetry*, then
*AddBlock* will be resent.
> 2. Rebuild Spark and run following job:
> {code}
>   def streamProcessing(): Unit = {
>     val conf = new SparkConf()
>       .setAppName("StreamingTest")
>       .setMaster(masterUrl)
>     val ssc = new StreamingContext(conf, Seconds(200))
>     val stream = ssc.socketTextStream("localhost", 1234)
>     stream.print()
>     ssc.start()
>     ssc.awaitTermination()
>   }
> {code}
> To fix:
> It makes sense to provide a blocking version *ask* in *RpcEndpointRef*, as [~vanzin]
mentioned in SPARK-18113 (https://github.com/apache/spark/pull/16503#event-927953218), *askWithRetry*
is a leftover from akka days. It imposes restrictions on the caller(e.g. idempotency) and
other things that people generally don't pay that much attention to when using it.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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


Mime
View raw message