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

SimpleFutureAction.onComplete should not tie up a separate thread for each callback

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0
    • Spark Core
    • None

    Description

      As zsxwing points out at https://github.com/apache/spark/pull/7276#issuecomment-121097747, SimpleFutureAction currently blocks a separate execution context thread for each callback registered via onComplete:

        override def onComplete[U](func: (Try[T]) => U)(implicit executor: ExecutionContext) {
          executor.execute(new Runnable {
            override def run() {
              func(awaitResult())
            }
          })
        }
      

      We should fix this so that callbacks do not steal threads.

      Attachments

        Issue Links

          Activity

            People

              reggert1980 Richard W. Eggert II
              joshrosen Josh Rosen
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: