Property terms migration
Strategy
We will migrate proeprty terms from wb_terms table (old) into the new schema tables (new)
following the usual migration plan:
- read old, write old
- read old, write both & run maintenance on all Properties
- read new, write both
- read new, write new
Estimations
- Demand on extra disk space will be below 20MB for the whole thing.
- Maintenance script is estimated to execute in matter of few minutes.
- Property terms are small in size but they are heavy-read. After putting caches in place, no risk on read performance degradation as we will switch to reading from new right after maintenance script is finished, and probably also stop writing to new the next day.
Item terms migration
Strategy
To avoid a very big extra disk space needed when we start migrating item terms,
as well as a risky overhead on read performance, we will do this in a slightly modified
version of the usual process (the one we follow above).
- read old, write both - run maintenance on Q1-Q2mio terms (the most accessed ones)
- read one, write both for Q ID <= 2mio or write old only otherwise (timeboxed for 2 weeks to monitor performance)
- read one, write one (until we have new master with higher capacities) & run maintenance on all items
- read new, write new
where:
- write one means programmatically decide which schema to write to based on item id ( > 2mio => old, <= 2mio => new)
- read one means programmatically decide which schema to read from based on item id ( > 2mio => old, <= 2mio => new)
- run maintenance here will always be done in batches/iterations.
Estimations
- In step 1, we migrate 10% of items to the new schema in order to reduce the extra disk space needed after step 1, which should be around 17GB.
- We also greatly reduce the risk of performance degradation on reads as we will determine which schema to read from on application level and avoid reading from both always.
- In case of need to revert or rollback, that will be quick and easy during step 2 (which is delayed until we have the new more capable master in place and shouldn't expect much problems anyway by then)