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

Create ChainWorkerActor #2135

Merged
merged 31 commits into from
Jun 17, 2024
Merged

Create ChainWorkerActor #2135

merged 31 commits into from
Jun 17, 2024

Conversation

jvff
Copy link
Contributor

@jvff jvff commented Jun 15, 2024

Motivation

Currently the ChainStateView is reloaded for every worker operation. This is inefficient because it involves deserializing data every time.

Proposal

Create a ChainWorkerActor that wraps a ChainWorkerState and keeps it loaded while the actor is running. For now, even though actors run on new tasks, they only handle one operation and then finish the task. A separate PR will make them long-lived.

Test Plan

This is an internal refactor, so existing tests should catch any regressions.

Release Plan

This is an internal refactor, so nothing is needed.

Links

@jvff jvff added the enhancement New feature or request label Jun 15, 2024
@jvff jvff added this to the Testnet milestone Jun 15, 2024
@jvff jvff requested review from Twey, ma2bd, ndr-ds and afck June 15, 2024 05:14
@jvff jvff self-assigned this Jun 15, 2024
jvff added 16 commits June 17, 2024 09:38
A wrapper for a `ChainWorkerState` that runs on its own separate task.
Handle the request in the `ChainWorkerActor`.
Prepare to have the actor run for a longer term.
Handle the request in the `ChainWorkerActor`.
Prepare to have the actor run for a longer term.
Collect common code into the helper method.
Handle the request in the `ChainWorkerActor`.
Prepare to have the actor run for a longer term.
Handle the request in the `ChainWorkerActor`.
Prepare to have the actor run for a longer term.
Handle the request in the `ChainWorkerActor`.
Prepare to have the actor run for a longer term.
Handle the request in the `ChainWorkerActor`.
Prepare to have the actor run for a longer term.
Handle the request in the `ChainWorkerActor`.
Prepare to have the actor run for a longer term.
jvff added 6 commits June 17, 2024 13:29
Handle the request in the `ChainWorkerActor`.
Prepare to have the actor run for a longer term.
Handle the request in the `ChainWorkerActor`.
Prepare to have the actor run for a longer term.
Handle the request in the `ChainWorkerActor`.
Prepare to have the actor run for a longer term.
jvff added 9 commits June 17, 2024 13:32
Handle the request in the `ChainWorkerActor`.
Prepare to have the actor run for a longer term.
Handle the request in the `ChainWorkerActor`.
Prepare to have the actor run for a longer term.
Handle the request in the `ChainWorkerActor`.
Prepare to have the actor run for a longer term.
Handle the request in the `ChainWorkerActor`.
Prepare to have the actor run for a longer term.
The `ChainWorkerActor` is used instead.
@jvff jvff merged commit bf49645 into linera-io:main Jun 17, 2024
3 checks passed
@jvff jvff deleted the chain-worker-actor branch June 17, 2024 14:59
@jvff jvff mentioned this pull request Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants