-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[SPARK-12122][STREAMING] Prevent batches from being submitted twice after recovering StreamingContext from checkpoint #10127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Test build #2161 has finished for PR 10127 at commit
|
Test build #47134 has finished for PR 10127 at commit
|
Test build #2162 has finished for PR 10127 at commit
|
@@ -220,7 +220,8 @@ class JobGenerator(jobScheduler: JobScheduler) extends Logging { | |||
logInfo("Batches pending processing (" + pendingTimes.size + " batches): " + | |||
pendingTimes.mkString(", ")) | |||
// Reschedule jobs for these times | |||
val timesToReschedule = (pendingTimes ++ downTimes).distinct.sorted(Time.ordering) | |||
val timesToReschedule = (pendingTimes ++ downTimes).filter { _ != restartTime } | |||
.distinct.sorted(Time.ordering) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you clarify why pendingTimes
may contain restartTime
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explained offline:
The restart time is always checkpointTime+1 (assuming batch duration = 1). However, pending times can already have batches >= checkpointTime+1. This can cause timesToReschedule
to have batches >= checkpointTime+1, which will be explicitly submitted, and then resubmitted through the timer.
LGTM |
Test build #2164 has finished for PR 10127 at commit
|
Test build #2165 has finished for PR 10127 at commit
|
Test build #47163 has finished for PR 10127 at commit
|
…fter recovering StreamingContext from checkpoint Author: Tathagata Das <tathagata.das1565@gmail.com> Closes #10127 from tdas/SPARK-12122. (cherry picked from commit 4106d80) Signed-off-by: Tathagata Das <tathagata.das1565@gmail.com>
No description provided.