Skip to content

Commit

Permalink
record only one error per job in broker
Browse files Browse the repository at this point in the history
addresses #919 and #887
  • Loading branch information
abyrd committed Dec 20, 2023
1 parent a79e2bb commit 2efbc15
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,11 @@ public synchronized void markTaskCompleted (Job job, int taskId) {
*/
private synchronized void recordJobError (Job job, String error) {
if (job != null) {
job.errors.add(error);
// Limit the number of errors recorded to one.
// Still using a Set<String> instead of just String since the set of errors is exposed in a UI-facing API.
if (job.errors.isEmpty()) {
job.errors.add(error);
}
}
}

Expand Down

0 comments on commit 2efbc15

Please sign in to comment.