Skip to content

Commit

Permalink
SQUASH Mendes round 1
Browse files Browse the repository at this point in the history
  • Loading branch information
cjpatton committed Jul 10, 2023
1 parent f786849 commit 083e09c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions daphne/src/testing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1204,8 +1204,8 @@ impl AggregationJobTest {
prometheus_registry,
leader_metrics,
helper_metrics,
leader_reports_processed: Arc::new(Mutex::new(HashSet::new())),
helper_reports_processed: Arc::new(Mutex::new(HashSet::new())),
leader_reports_processed: Default::default(),
helper_reports_processed: Default::default(),
}
}

Expand Down
1 change: 1 addition & 0 deletions daphne/src/vdaf/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,7 @@ impl VdafConfig {
.initialize_reports(true, task_id, task_config, part_batch_sel, consumed_reports)
.await?;

assert_eq!(initialized_reports.len(), helper_shares.len());
for (initialized_report, helper_share) in initialized_reports
.into_iter()
.zip(helper_shares.into_iter())
Expand Down
10 changes: 5 additions & 5 deletions daphne_worker/src/dap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,11 @@ impl DapReportInitializer for DaphneWorker<'_> {
} = initialized_report
{
// The request to ReportsProcessed is not idempotent. If it was retried, then
// it's possible that one or more of the reports were erroneously as replayed.
// This would happen if, for example, a fresh report was marked as aggregated
// in the failed request, then marked as replayed by a retried request. In this
// case we cannot determine definitively if the report was replayed, so we drop
// it to be safe.
// it's possible that one or more of the reports were erroneously marked as
// replayed. This would happen if, for example, a fresh report was marked as
// aggregated in the failed request, then marked as replayed by a retried
// request. In this case we cannot determine definitively if the report was
// replayed, so we drop it to be safe.
if retried && matches!(failure, TransitionFailure::ReportReplayed) {
*failure = TransitionFailure::ReportDropped;
}
Expand Down

0 comments on commit 083e09c

Please sign in to comment.