lbryio / lbrycrd

The blockchain that provides the digital content namespace for the LBRY protocol

Home Page:https://lbry.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve behavior when killing process abruptly / machine dying

tzarebczan opened this issue · comments

Today, if you kill lbrycrd without using the stop command or if the machine crashes, you'll get an error about reindexing and reindexing chainstate. Per @BrannonKing , reindex-chainstate may not work well in all instances and should be avoided.

We should also somehow store the state better so it's able to recover from these types of crashes.

I've already modified the current codebase to sync to disk every block (within the last two-hour time window). That will come out with the next release, ensuring that if you die in between block processing you should be fine.

Also "kill" is somewhat ambiguous. Ctrl+C will give you a clean shutdown in the current release.

Merged via #308