Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement cancellation on disconnect. #3131

Merged
merged 1 commit into from
May 13, 2024

Conversation

branlwyd
Copy link
Member

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.

Update Helper aggregation methods, which use rayon to parallelize processing, to respect cancellation. Specifically, the receiver will be dropped, causing the producer's sender to return a SendError, which will cause try_for_each_with to stop processing.

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.

Update Helper aggregation methods, which use rayon to parallelize
processing, to respect cancellation. Specifically, the `receiver` will
be dropped, causing the producer's `sender` to return a SendError, which
will cause `try_for_each_with` to stop processing.
@branlwyd branlwyd requested a review from a team as a code owner May 13, 2024 23:15
@branlwyd
Copy link
Member Author

I will update Leader aggregation methods in a follow-on PR which also implements parallelization.

Stacked on #3119.
Part of #3033.
Part of #3035.

@branlwyd
Copy link
Member Author

I'm going to merge this into the parent PR (#3119), as it addresses all current comments on that PR.

@branlwyd branlwyd merged commit 79ec08b into bran/parallel-report-processing May 13, 2024
7 checks passed
@branlwyd branlwyd deleted the bran/cancel-on-disconnect branch May 13, 2024 23:30
branlwyd added a commit that referenced this pull request May 15, 2024
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.

Update Helper aggregation methods, which use rayon to parallelize
processing, to respect cancellation. Specifically, the `receiver` will
be dropped, causing the producer's `sender` to return a SendError, which
will cause `try_for_each_with` to stop processing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant