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

ref(actix): Port EnvelopeProcessor to tokio [INGEST-1566 INC-202] #1470

Merged
merged 6 commits into from
Sep 15, 2022

Conversation

jan-auer
Copy link
Member

@jan-auer jan-auer commented Sep 14, 2022

Removes the actix SyncArbiter in favor of a plain tokio service that
uses a semaphore around spawn_blocking to delegate CPU-intensive work.
The service is started in the main runtime since it does not exhibit a
large footprint. Tokio runtimes have a larger number of blocking threads
than required by the EnvelopeProcessor.

Tokio ensures that there are always threads to run blocking tasks. If
one of the tasks panics, drop handlers are still run, the panic handler
picks up the panic (reporting it to Sentry), and tokio starts a new
thread.

Note: The EnvelopeProcessor unit tests still do not require a tokio
runtime and cannot mock service dependencies. They will be ported in a
follow-up.

@jan-auer jan-auer mentioned this pull request Sep 14, 2022
30 tasks
@jan-auer jan-auer marked this pull request as ready for review September 14, 2022 12:26
@jan-auer jan-auer requested a review from a team September 14, 2022 12:26
@jan-auer jan-auer assigned jan-auer and unassigned flub and tobias-wilfert Sep 14, 2022
relay-server/src/utils/unreal.rs Show resolved Hide resolved
relay-server/src/actors/processor.rs Outdated Show resolved Hide resolved
relay-server/src/actors/processor.rs Outdated Show resolved Hide resolved
relay-server/src/actors/processor.rs Outdated Show resolved Hide resolved
@jan-auer jan-auer changed the title ref(actix): Port EnvelopeProcessor to tokio [INGEST-1566] ref(actix): Port EnvelopeProcessor to tokio [INGEST-1566 INC-202] Sep 15, 2022
* master:
  fix(profiling): Expand all Profile items in an envelope (#1465)
@jan-auer jan-auer enabled auto-merge (squash) September 15, 2022 07:25
@jan-auer jan-auer merged commit 411c5e4 into master Sep 15, 2022
@jan-auer jan-auer deleted the ref/actix-envelope-processor branch September 15, 2022 09:00
@HazAT HazAT added this to the Upgrade Tokio in Relay milestone Nov 21, 2022
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.

4 participants