nano-node icon indicating copy to clipboard operation
nano-node copied to clipboard

Evaluate and/or implement an online DB upgrade process

Open qwahzi opened this issue 2 years ago • 0 comments

Summary

For database-related changes (e.g. the upcoming split block table changes and/or successors table changes), there are two big challenges related to the required database upgrades: 1) the disk space requirements for the upgrade (often ~2x), & 2) potential downtime/slow startup during the upgrade/first start process

To help address these issues, we should explore enabling online upgrades - The online upgrade would do the database upgrade in the background, and blocks would be queried from both tables until the upgrade process is complete. This makes sense conceptually (and could be reused for upgrades in the future), but will take a lot of work to implement

Related: Background ledger upgrades connect nicely to abstracting out the ledger functionality with the ledger class. Nowadays we do a lot of direct store lookups, and using ledger we could add this functionality. This could help with the online upgrade work

qwahzi avatar Sep 27 '23 18:09 qwahzi