-
Notifications
You must be signed in to change notification settings - Fork 871
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
add fallback for parallelization #8084
Conversation
Signed-off-by: Karim Taam <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ParallelizedConcurrentTransactionProcessor parallelizedConcurrentTransactionProcessor = | ||
new ParallelizedConcurrentTransactionProcessor(transactionProcessor); | ||
// runAsyncBlock, if activated, facilitates the non-blocking parallel execution of | ||
// transactions in the background through an optimistic strategy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggesting the following comment instead, as 'non-blocking' could have a different meaning : When enabled, runAsyncBlock performs non-conflicting parallel execution of transactions in the background using an optimistic approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
if (blockProcessingResult.isFailed()) { | ||
// Fallback to non-parallel processing if there is a block processing exception . | ||
LOG.info( | ||
"Block processing failed. Falling back to non-parallel processing for block #{} ({})", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps change this log to "Parallel transaction processing failure. Falling... ". Just to be more clear in the log output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modified
@@ -1816,10 +1816,8 @@ public BesuControllerBuilder setupControllerBuilder() { | |||
if (DataStorageFormat.BONSAI.equals(getDataStorageConfiguration().getDataStorageFormat())) { | |||
final DiffBasedSubStorageConfiguration subStorageConfiguration = | |||
getDataStorageConfiguration().getDiffBasedSubStorageConfiguration(); | |||
if (subStorageConfiguration.getLimitTrieLogsEnabled()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this a git merge thing? odd that we were gating parallel tx on trielog pruning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a bug I found so I removed this invalid check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢 , minor log suggestion. Reframing as blockPreprocessing is a clean and useful refactor 👍
final List<BlockHeader> ommers, | ||
final Optional<List<Withdrawal>> maybeWithdrawals, | ||
final PrivateMetadataUpdater privateMetadataUpdater, | ||
final PreprocessingFunction preprocessingBlockFunction) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Signed-off-by: Karim Taam <[email protected]>
PR description
This pull request introduces a fallback mechanism that go back to non-parallelization if a problem is detected during parallel execution. This is a mitigation measure to address the issue while a permanent fix is being developed and will be delivered in a subsequent PR.
Fixed Issue(s)
Thanks for sending a pull request! Have you done the following?
doc-change-required
label to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew build
./gradlew acceptanceTest
./gradlew integrationTest
./gradlew ethereum:referenceTests:referenceTests