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

[5.0] Normalize speculative & producer block intervals #1840

Merged
merged 1 commit into from
Oct 28, 2023

Conversation

heifner
Copy link
Member

@heifner heifner commented Oct 27, 2023

#1481 changed speculative block creation so that speculative blocks would always have a current block time. However, it didn't correctly handle the case where the configured producer was the scheduled producer but could not produce (e.g. incorrect configured private key). This PR simplifies the implementation to just use the producer schedule as configured by produce-block-offset-ms regardless if the block is speculative or a producer block. This normalizes block production time for speculative and producer blocks. I think this normalization is better than maintaining different block intervals for speculative vs producer nodes.

Resolves #1837

@heifner heifner added the OCI Work exclusive to OCI team label Oct 27, 2023
@heifner heifner requested review from greg7mdp and linh2931 October 27, 2023 19:23
Copy link
Member

@linh2931 linh2931 left a comment

Choose a reason for hiding this comment

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

Is it possible to add a test where the scheduled producer could not produce?

@heifner
Copy link
Member Author

heifner commented Oct 27, 2023

Is it possible to add a test where the scheduled producer could not produce?

I think that would be under #1804

There are tests in test_block_timing_util.cpp that test the timings, so I feel the functionality is well tested; just not the actual usage here.

@linh2931
Copy link
Member

I think that would be under #1804

There are tests in test_block_timing_util.cpp that test the timings, so I feel the functionality is well tested; just not the actual usage here.

I meant the situation reported by #1837. No more lots of "not producing" messages after this fix. But if it is too much effort, there is no need to do that, as the fix makes things simpler. I am approving the PR.

@heifner heifner merged commit 71d4022 into release/5.0 Oct 28, 2023
29 checks passed
@heifner heifner deleted the GH-1837-bp-time-5.0 branch October 28, 2023 20:27
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.

3 participants