Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement cancellation on disconnect, & parallelize Helper aggregatio…
…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