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

Add force_run_chain Notify #1525

Merged
merged 2 commits into from
Mar 14, 2024
Merged

Add force_run_chain Notify #1525

merged 2 commits into from
Mar 14, 2024

Conversation

rukai
Copy link
Member

@rukai rukai commented Mar 13, 2024

progress towards #1507

This PR introduces a way for transforms to force a chain run via a Notify passed to the transform build method.

This will enable 3 things to be implemented in future PRs:

  • Sinks will be able to return immediately after sending requests and return responses as they are received
  • The removal of Transform::transform_pushed, instead push/event messages will go through Transform::transform
  • Coalesce like transforms will be able to flush messages at any time, without having to wait for a request to come from the client.

I have also changed the select! in server.rs to be biased, I believe this is important since we should always process the force_run_chain branch if available to ensure that we consume the notify to avoid needlessly running the chain twice.
With the move to biased, we also need the shutdown branch in the first position to ensure that we can still shutdown shotover while under heavy load.

@rukai rukai force-pushed the force_run_chain branch 3 times, most recently from a45a38f to 181c84a Compare March 13, 2024 03:23
@rukai rukai force-pushed the force_run_chain branch from 181c84a to 4d56d84 Compare March 13, 2024 03:25
@rukai rukai changed the title Add force_run_chain notification Add force_run_chain Notify Mar 13, 2024
@rukai rukai marked this pull request as ready for review March 13, 2024 03:56
@rukai rukai requested a review from conorbros March 13, 2024 03:56
@conorbros conorbros enabled auto-merge (squash) March 14, 2024 09:57
@conorbros conorbros merged commit 97f027a into shotover:main Mar 14, 2024
40 checks passed
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.

3 participants