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

Do not post to thread pool while syncing/replaying #269

Merged
merged 2 commits into from
Jun 11, 2024
Merged

Conversation

heifner
Copy link
Member

@heifner heifner commented Jun 11, 2024

As pointed out in review of #262,
address #262 (comment)

@heifner heifner added the OCI Work exclusive to OCI team label Jun 11, 2024
@@ -3978,18 +3980,20 @@ struct controller_impl {
// 3. Otherwise, consider voting for that block according to the decide_vote rules.

if (!my_finalizers.empty() && bsp->core.final_on_strong_qc_block_num > 0) {
if (use_thread_pool == use_thread_pool_t::yes) {
boost::asio::post(thread_pool.get_executor(), [this, bsp=bsp]() {
if (bsp->is_recent() || my_finalizers.is_active()) {
Copy link
Contributor

@greg7mdp greg7mdp Jun 11, 2024

Choose a reason for hiding this comment

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

A little annoying that we need || my_finalizers.is_active(), but I guess it is needed to ensure that once we start voting, we don't stop.
Maybe add a short comment to that effect as I don't think it is immediately obvious.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, not really sure we need that restriction, but it is current requirements.

Base automatically changed from GH-135-update-fsi to main June 11, 2024 15:38
@heifner heifner merged commit 8a4bc54 into main Jun 11, 2024
36 checks passed
@heifner heifner deleted the GH-262-opt branch June 11, 2024 16:26
@ericpassmore
Copy link
Contributor

Note:start
group: STABILITY
category: INTERNALS
summary: When syncing/replaying optimize voting-start by processing on main thread.
Note:end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI Work exclusive to OCI team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants