Skip to content
Snippets Groups Projects
Commit f0d50fd5 authored by Tyson Condie's avatar Tyson Condie Committed by Shixiong Zhu
Browse files

[SPARK-19891][SS] Await Batch Lock notified on stream execution exit

## What changes were proposed in this pull request?

We need to notify the await batch lock when the stream exits early e.g., when an exception has been thrown.

## How was this patch tested?

Current tests that throw exceptions at runtime will finish faster as a result of this update.

zsxwing

Please review http://spark.apache.org/contributing.html

 before opening a pull request.

Author: Tyson Condie <tcondie@gmail.com>

Closes #17231 from tcondie/kafka-writer.

(cherry picked from commit 501b7111)
Signed-off-by: default avatarShixiong Zhu <shixiong@databricks.com>
parent a59cc369
No related branches found
No related tags found
No related merge requests found
......@@ -348,6 +348,13 @@ class StreamExecution(
}
}
} finally {
awaitBatchLock.lock()
try {
// Wake up any threads that are waiting for the stream to progress.
awaitBatchLockCondition.signalAll()
} finally {
awaitBatchLock.unlock()
}
terminationLatch.countDown()
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment