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

[4.0] Execute read only safe tasks on read-only thread pool #901

Merged
merged 54 commits into from
Mar 30, 2023

Conversation

heifner
Copy link
Member

@heifner heifner commented Mar 25, 2023

This PR moves read-only safe operations to also execute on the read-only thread pool along with read-only transactions during the read-only-read-window-time-us window.

Note read and write windows are interrupted when new blocks are received.

--read-only-threads now defaults to 3 on non-producer configured nodeos that enable the eosio::chain_api_plugin.
Block relay nodes or canary nodes should consider --read-only-threads=0. Since eosio::chain_api_plugin may be enabled so /v1/chain/get_info is available. If other http request and push_* operations of eosio::chain_api_plugin are not used there is no benefit to enabling read-only-threads. If read-only-threads are enabled, but not utilized, there is a very small overhead of switching back and forth between the read/write windows.
See: #837 (comment)

Moves /v1/net/* calls to http thread pool, off main app thread, since they are thread-safe.

Builds on #776.
Resolves #810

heifner and others added 30 commits March 25, 2023 10:38
Since repost_exhausted_transactions is called in start_block, check should_interrupt_start_block in while loop.
Copy link
Contributor

@greg7mdp greg7mdp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation OCI Work exclusive to OCI team
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Move all read-only operations to parallel execution of all read operations
4 participants