Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-2677

BasicBlockFetchIterator#next can wait forever

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 0.9.2, 1.0.0, 1.0.1
    • 1.1.0
    • Spark Core
    • None

    Description

      In BasicBlockFetchIterator#next, it waits fetch result on result.take.

          override def next(): (BlockId, Option[Iterator[Any]]) = {
            resultsGotten += 1
            val startFetchWait = System.currentTimeMillis()
            val result = results.take()
            val stopFetchWait = System.currentTimeMillis()
            _fetchWaitTime += (stopFetchWait - startFetchWait)
            if (! result.failed) bytesInFlight -= result.size
            while (!fetchRequests.isEmpty &&
              (bytesInFlight == 0 || bytesInFlight + fetchRequests.front.size <= maxBytesInFlight)) {
              sendRequest(fetchRequests.dequeue())
            }
            (result.blockId, if (result.failed) None else Some(result.deserialize()))
          }
      

      But, results is implemented as LinkedBlockingQueue so if remote executor hang up, fetching Executor waits forever.

      Attachments

        Issue Links

          Activity

            People

              sarutak Kousuke Saruta
              sarutak Kousuke Saruta
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: