openethereum / parity-ethereum

The fast, light, and robust client for Ethereum-like networks.
Other
6.83k stars 1.69k forks source link

Out of Disk can induce DB corruption, proposed measure #11721

Open denisgranha opened 4 years ago

denisgranha commented 4 years ago

Right now, the node will run forever if everything is ok, but in the case of disk growth, rockDB can enter into corrupted DB state if the system runs Out of Disk.

In order to avoid that, I would propose to add a check that runs periodically and in case of low disk, it fails with a warning.

What is low disk, it pretty much depends on the chain I guess, but as a default value we can define it as 5 GB or 5% disk.

naiemk commented 4 years ago

+1. Having an option to stop the node if it is running out of disk is both lifesaving and rational. Why corrupt the state while it can be easily avoided. Why drive right into the wall. Our node ran out of disk and got us into trouble. Resyncing from scratch takes a long time if it ever succeeds.