Shopify / ghostferry

The swiss army knife of live data migrations
https://shopify.github.io/ghostferry
MIT License
748 stars 70 forks source link

ReportProgress at the beginning of cutover #232

Closed shuhaowu closed 3 years ago

shuhaowu commented 3 years ago

After row copy is complete and during cutover, Ghostferry may still run some other code. Applications that run custom code at this phase may error and crash the Ghostferry process, which means the progress struct at the end of the copy may never be reported.

It would be nice to report progress immediately when row copy is complete, which should be around the invocation of f.notifyRowCopyComplete (this marks the beginning of cutover). This would guarantee that the last progress received reflects the state when all copy is done. We should leave the progress report at the end of the process as well, so the binlog position can be reported as well.

paarthmadan commented 3 years ago

I can take this on!