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] Fix for loading a snapshot with an empty block log but an existing fork database #1299

Merged
merged 6 commits into from
Jun 15, 2023

Conversation

heifner
Copy link
Member

@heifner heifner commented Jun 14, 2023

Additional test cases and fix for loading a snapshot without a block log. When loading a snapshot with a block log, the block log and fork database can be replayed if they start at or before the snapshot. If no block log exists, for example running with --block-log-retain-blocks 0, then the fork database can't be consider valid.

Includes a fix for new test introduced in #1276 which failed during ci/cd. ship_streamer.cpp updated to correctly handle forks.

Corner case related to #1228

@heifner heifner requested review from greg7mdp and linh2931 June 14, 2023 19:46
@heifner heifner linked an issue Jun 14, 2023 that may be closed by this pull request
try {
snapshot->validate();
if( auto blog_head = blog.head() ) {
ilog( "Starting initialization from snapshot and block log ${b}-${e}, this may take a significant amount of time",
("b", blog.first_block_num())("e", blog_head->block_num()) );
read_from_snapshot( snapshot, blog.first_block_num(), blog_head->block_num() );
Copy link
Member

Choose a reason for hiding this comment

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

Do you want to add a similar log saying snapshot has been loaded?

ilog( "Snapshot loaded, lib: ${lib}", ("lib", lib_num) );

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, thanks. Done.

@heifner heifner added the OCI Work exclusive to OCI team label Jun 15, 2023
@heifner heifner merged commit ce6f2cf into release/4.0 Jun 15, 2023
@heifner heifner deleted the GH-1228-empty-block-log-4.0 branch June 15, 2023 15:37
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.

Starting node from a snapshot fails if the node has no blocks
3 participants