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

fix(db): skip expired checkpoints for recovery #5224

Conversation

tomatoishealthy
Copy link
Contributor

@tomatoishealthy tomatoishealthy commented May 18, 2023

What does this PR do?

The logic of checkpoint v2 prune is just deleting the directory if the checkpoint is expired, but the deletion is not an atomic operation and the expired checkpoints may be corrupted when kill -9 or machine shutdown, so we should skip the expired checkpoints when recovering.

Why are these changes required?

This PR has been tested by:

  • Unit Tests
  • Manual Testing

Follow up

Extra details

@tomatoishealthy tomatoishealthy merged commit 2739234 into tronprotocol:release_v4.7.2 May 25, 2023
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.

3 participants