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

Add graphman rewind #2373

Merged
merged 3 commits into from
Apr 20, 2021
Merged

Add graphman rewind #2373

merged 3 commits into from
Apr 20, 2021

Conversation

lutter
Copy link
Collaborator

@lutter lutter commented Apr 12, 2021

No description provided.

Comment on lines +969 to +984
// Sanity check on block numbers
if block_ptr_from.number != block_ptr_to.number + 1 {
panic!("revert_block_operations must revert a single block only");
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this just here because we revert block by block usually? It's not here because reverting many blocks at once breaks things?

Copy link
Collaborator Author

@lutter lutter Apr 12, 2021

Choose a reason for hiding this comment

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

It probably used to be that we had to go block-by-block; but for quite some time now, it's been safe to jump the block pointer back (assuming you know that you are jumping to the correct block pointer, which this PR slyly puts on the user) All the reversion queries just look at things that happened at/after the given block.

I left that code in since I didn't want to muck with the 'normal' reversion code path.

Copy link
Contributor

@Jannis Jannis left a comment

Choose a reason for hiding this comment

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

There's one thing in the changed code that I'm not sure about. Otherwise the changes look correct.

@lutter lutter merged commit 94e6d49 into master Apr 20, 2021
@lutter lutter deleted the lutter/rewind branch April 21, 2021 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants