Skip to content

Conversation

@karalabe
Copy link
Member

When we originally implemented the freezer, it was disallowed to roll back items from it. In theory Geth will never do it itself during normal mode of operation, but in practice the user can call SetHead and Geth can roll back during fast sync. With the unified rollback handling, all these paths use the same code that printed the warning. This resulted in 2000 truncation warnings printed every time fast sync failed (2K headers rolled back).

This PR changes the behavior so that if only a single item is removed (SetHead will remove one-by-one since it needs to do additional maintenance after each), the log level is Debug, not Warn. If the freezer gets corrupted and a lot of data is removed we will still see the large truncation warnings.

@karalabe karalabe added this to the 1.9.20 milestone Aug 25, 2020
@karalabe karalabe requested a review from holiman August 25, 2020 05:49
@karalabe karalabe requested a review from rjl493456442 as a code owner August 25, 2020 05:49
Copy link
Member

@rjl493456442 rjl493456442 left a comment

Choose a reason for hiding this comment

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

LGTM

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