Skip to content

Commit

Permalink
Implement cancellation on disconnect, & parallelize Helper aggregatio…
Browse files Browse the repository at this point in the history
…n computations. (#3119)

This will be very helpful when we have requests which timeout, which is presented to Janus as a client disconnect. Otherwise, we would continue processing the request until it is complete.

Previously, we used a rayon threadpool for aggregation computations, but the computations within the handling of a single aggregation job were still serialized. Now, we use a parallel iterator for handling each report share in turn, allowing the VDAF evaluations to be performed in parallel. The Helper methods are also updated such that the parallel computations respect cancellation. Specifically, the `receiver` will be dropped on cancellation, causing the producer threads' `sender` to return a `SendError` when they attempt to send, which will cause `try_for_each_with` to stop processing, which will cause the producer thread to terminate.

Also, remove the (unstated!) requirement in aggregation_job_writer than report aggregations be provided in order. This eases parallelization of the aggregation job continuation logic.
  • Loading branch information
branlwyd committed May 15, 2024
1 parent 970bd57 commit 7cc5b00
Show file tree
Hide file tree
Showing 5 changed files with 576 additions and 514 deletions.
Loading

0 comments on commit 7cc5b00

Please sign in to comment.