4 ms·
Some upgrades are a one shot deal. If you refactor a data structure, you have to plan to unrefactor it. If you don't, then there are two options, push forward (
by lykr0n 9y ago
Some upgrades are a one shot deal. If you refactor a data structure, you have to plan to unrefactor it. If you don't, then there are two options, push forward (or hotfix) or restore from backups.
Massive schema migrations would be my guess. And I'm willing to bet that their Test/QA Environment only has a small set of test data and not a replication of production
- aneutron 9y agoIf you run a 700M$ exchange, you should probably have a cold backup of your database every other hour. I think.
- lykr0n 9y agoAt the very least full offline backup before you start.
- adamzochowski 9y agoI believe the proper way to upgrade schema is to 1) don't change existing schema (don't alter columns) 2) introduce new schema, side by side (add new columns, all nulls, without defaults) 3) update code to read new schema first, if nothing found, read old schema, 4) create triggers that a write in new or old schema updates the other 5) have a separate process to sequentially migrate data from old schema to new schema 6) once all records are migrated to new schema, start slowly removing code that reads old schema 7) once nothing reads old schema, delete it Handling schema changes is a tricky process that is spread across multiple different steps, where each step can be rolled back.