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

Support speculative trx execution in irreversible mode #1036

Merged
merged 11 commits into from
Nov 21, 2024

Conversation

heifner
Copy link
Member

@heifner heifner commented Nov 15, 2024

With Savanna instant finality, there is now no longer a good reason to prevent speculative trx execution on irreversible nodes; so remove the restriction.

Changed the distributed transaction test to always run with speculative, head, and irreversible mode nodes.

Note to disable speculative trx execution on irreversible nodes (or any node), it now must be specified via api-accept-transactions = false and p2p-accept-transactions = false.

Modify syncing heuristic in producer_plugin to 5 minutes to match what is used in controller.

Resolves #1030

@heifner heifner requested review from greg7mdp and linh2931 November 15, 2024 19:52
@heifner heifner added the OCI Work exclusive to OCI team label Nov 15, 2024
@greg7mdp greg7mdp added the documentation Improvements or additions to documentation label Nov 15, 2024
assert(root_bsp);
root = root_bsp;
root->set_valid(true);
pending_savanna_lib_id = block_id_type{};
index.clear();
}

Copy link
Member Author

Choose a reason for hiding this comment

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

The reset of pending_savanna_lib_id is needed as starting in irreversible mode can reset the forkdb root to head. If the node is started again then it would try and advance LIB and segfault because the fork db didn't have anything in the index which means forkdb.head() returns nullptr. I attempted to reproduce this in 1.0.x, but couldn't find a way to trigger it. Not sure if we should backport it to 1.0.x or not.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe not backport for now as it is a rare case and 1.1.x is not far away.

@heifner heifner marked this pull request as draft November 19, 2024 13:44
@heifner heifner marked this pull request as ready for review November 19, 2024 15:59
@heifner heifner requested review from linh2931 and greg7mdp November 19, 2024 15:59
assert(root_bsp);
root = root_bsp;
root->set_valid(true);
pending_savanna_lib_id = block_id_type{};
index.clear();
}

Copy link
Member

Choose a reason for hiding this comment

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

Maybe not backport for now as it is a rare case and 1.1.x is not far away.

@heifner heifner requested a review from linh2931 November 20, 2024 16:54
@heifner heifner merged commit f2e3344 into main Nov 21, 2024
36 checks passed
@heifner heifner deleted the GH-1030-irreversible-mode-trx branch November 21, 2024 15:40
@ericpassmore
Copy link
Contributor

Note:start
category: System Stability
component: Internal
summary: Support speculative transaction execution in irreversible mode.
Note:end

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
None yet
Development

Successfully merging this pull request may close these issues.

Allow speculative trx execution in irreversible mode
4 participants