-
Notifications
You must be signed in to change notification settings - Fork 69
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
refactor thread and asio usage in state history plugin #627
Labels
Comments
|
There are other benefits to allowing blocklog to be thread safe, such as net_plugin being able to pull requested blocks from it on while on net threads, so seems like this would be good improvement to hit first |
1 task
heifner
added a commit
that referenced
this issue
Feb 14, 2023
heifner
added a commit
that referenced
this issue
Feb 14, 2023
heifner
added a commit
that referenced
this issue
Feb 15, 2023
heifner
added a commit
that referenced
this issue
Feb 15, 2023
heifner
added a commit
that referenced
this issue
Feb 15, 2023
heifner
added a commit
that referenced
this issue
Feb 15, 2023
heifner
added a commit
that referenced
this issue
Feb 17, 2023
…ssion_manager is used to coordinate sending since only one session can access the trace/delta log files at a time.
heifner
added a commit
that referenced
this issue
Feb 17, 2023
heifner
added a commit
that referenced
this issue
Feb 18, 2023
heifner
added a commit
that referenced
this issue
Feb 20, 2023
heifner
added a commit
that referenced
this issue
Feb 20, 2023
heifner
added a commit
that referenced
this issue
Feb 21, 2023
heifner
added a commit
that referenced
this issue
Feb 21, 2023
heifner
added a commit
that referenced
this issue
Mar 2, 2023
heifner
added a commit
that referenced
this issue
Mar 2, 2023
SHiP move client handling off the main thread
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some usage of asio in state history plugin looks at odds with typical asio patterns. For example: needing a connection to call an explicit
close()
function after a failure occurs (normally you'd just let the shared_ptr fall out of scope to dtor it), and some sort ofstopping
variable (normally you'd juststop()
the io_context which then ensures no callbacks are running, and then just let everything dtor itself). To be fair there may be yet-undiscovered-to-me reasons these are required, but so far I haven't seen it.state history plugin is also very loose and haphazard with how it handles its thread, oftentimes punting back and forth between main thread. Yet, it seems like state history plugin's thread usage could be awfully simplistic: build up blocks' traces & deltas on the main thread and then when
on_accepted_block()
simplypost()
over to ship's thread which then does everything it needs to entirely on the ship thread without ever needing to go back to main thread.Resolving the above issues will make it significantly easier to reason about state history plugin's flow and will be less prone to introducing failures.
The text was updated successfully, but these errors were encountered: