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

Very subtle race condition in SparkListenerSuite

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.9.1
    • 1.0.0
    • Spark Core
    • None

    Description

      Much of SparkListenerSuite relies on LiveListenerBus's waitUntilEmpty() method. As the name suggests, this waits until the event queue is empty. However, the following race condition could happen:

      (1) We dequeue the event
      (2) The queue is empty, we return true
      (3) The test asserts something assuming that all listeners have finished executing (and fails)
      (4) The listeners receive the event

      This has been a possible race condition for a long time, but for some reason we've never run into it.

      Attachments

        Activity

          People

            andrewor14 Andrew Or
            andrewor14 Andrew Or
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: