File tree 1 file changed +17
-0
lines changed
src/main/java/com/spotify/reaper/service
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,9 @@ public void run() {
157
157
case PAUSED :
158
158
context .repairManager .scheduleRetry (this );
159
159
break ;
160
+ case ERROR :
161
+ resumeAfterError ();
162
+ break ;
160
163
}
161
164
} catch (RuntimeException e ) {
162
165
LOG .error ("RepairRun FAILURE" );
@@ -193,6 +196,20 @@ private void start() {
193
196
startNextSegment ();
194
197
}
195
198
199
+ /**
200
+ * Resumes execution of a repair run. Does the same as {@code start()}, except setting start time.
201
+ */
202
+ private void resumeAfterError () {
203
+ LOG .info ("Repairs for repair run #{} resuming after error" , repairRunId );
204
+ synchronized (this ) {
205
+ RepairRun repairRun = context .storage .getRepairRun (repairRunId ).get ();
206
+ context .storage .updateRepairRun (repairRun .with ()
207
+ .runState (RepairRun .RunState .RUNNING )
208
+ .build (repairRun .getId ()));
209
+ }
210
+ startNextSegment ();
211
+ }
212
+
196
213
/**
197
214
* Concludes the repair run.
198
215
*/
You can’t perform that action at this time.
0 commit comments