Skip to content

Commit

Permalink
better handle case where leader can't evaluate transition
Browse files Browse the repository at this point in the history
  • Loading branch information
tgeoghegan committed Aug 31, 2023
1 parent a5ba277 commit 384ed5e
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions aggregator/src/aggregator/aggregation_job_driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,21 +462,17 @@ impl AggregationJobDriver {
let (prep_state, message) = match transition.evaluate(vdaf.as_ref()) {
Ok((state, message)) => (state, message),
Err(error) => {
// This shouldn't ever happen, because we'd never store a transition that
// can't be evaluated. Most likely this indicates a programmer error (e.g.,
// using the wrong VDAF) but we still record this failure against a single
// report, rather than failing the entire request, to minimize impact if we
// ever encounter this bug.
info!(
report_id = %report_aggregation.report_id(),
error = ?error,
"Stored transition cannot be evaluated",
let prepare_error = handle_ping_pong_error(
task.id(),
Role::Leader,
report_aggregation.report_id(),
error,
&self.aggregate_step_failure_counter,
);
report_aggregations_to_write.push(
report_aggregation
.with_state(ReportAggregationState::Failed(prepare_error)),
);
self.aggregate_step_failure_counter
.add(1, &[KeyValue::new("type", "invalid_ping_pong_transition")]);
report_aggregations_to_write.push(report_aggregation.with_state(
ReportAggregationState::Failed(PrepareError::VdafPrepError),
));
continue;
}
};
Expand Down

0 comments on commit 384ed5e

Please sign in to comment.