4 Practices to Plan a Large-scale Data Migration | by Jonathan Seow | Mar, 2022

Migrate Row 1
Row 1 in new storage not up to date
Transition with out downtime
The 4 levels of migration
“double write”
// 4 values of the flagoldOnly = 0
writeBoth = 1
readNew = 2
newOnly = 3
// helper capabilities for situation checksoperate isReadNew(flag) flag == newOnly
func isWriteOld(flag)
return flag != newOnly
func isWriteNew(flag)
return flag != oldOnly
// learn logicif isReadNew(flag)
read_new()
else
read_old()
// write logicif isWriteOld(flag)
write_old()

if isWriteNew(flag)
write_new()

More Posts