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

Avoid corrupted files after shutdown #1074

Open
samuelmanzanera opened this issue Jun 8, 2023 · 2 comments
Open

Avoid corrupted files after shutdown #1074

samuelmanzanera opened this issue Jun 8, 2023 · 2 comments
Labels
DB Involve database enhancements

Comments

@samuelmanzanera
Copy link
Member

samuelmanzanera commented Jun 8, 2023

Is your feature request related to a problem?

If for some reason, during the database file writing phase the node is shutdown, the file is corrupted as it could not complete the writing.

Hence during the next startup, the loading phase crashes become some file cannot be read.

Describe the solution you'd like

We should support graceful shutdown strategy to avoid such situations as much as possible.

Few ideas to investigate:

  • Catch SIGTERM signal when the beam process is killed and do the proper work to finish the writing
  • Have some temporary files before the commit to the transaction chain & beacon chain files by swaping the temp as permanent file.

Additional context

No response

Epic

#261

@samuelmanzanera samuelmanzanera added feature New feature request enhancements and removed feature New feature request labels Jun 8, 2023
@samuelmanzanera samuelmanzanera added the DB Involve database label Jun 8, 2023
@bchamagne
Copy link
Member

bchamagne commented Jan 8, 2024

idea n°2 is called shadow paging, just stumbled upon that

@samuelmanzanera
Copy link
Member Author

there is also a more recent approach used in many database which is WAL, to provide atomicity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DB Involve database enhancements
Projects
None yet
Development

No branches or pull requests

2 participants