You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My team is investigating using Gh-ost for online schema migrations and we'd like to propose a feature we've been relying on in our current approach with LHM.
A new CLI option (raise_on_warnings?) would query for SHOW WARNINGS after each insert batch and fail the migration if warnings are found. This would optionally prevent data loss when e.g.:
I have a prototype that shows the direction of how this option could be implemented in Applier.ApplyIterationInsertQuery: Shopify#1
Some open questions:
Is it desired to always process warnings (with the CLI option enabled) or only if a row count discrepancy has been detected. The latter is the current, less strict behaviour of Shopify/lhm
I'd love to hear your suggestions before we propose a PR contribution, thanks!
The text was updated successfully, but these errors were encountered:
We think this is a good feature to have in gh-ost. I believe the lhm approach would be best: check warnings if there is a discrepancy in rows affected, then raise any warnings that aren't "Duplicate entry for <shared unique key>".
My team is investigating using Gh-ost for online schema migrations and we'd like to propose a feature we've been relying on in our current approach with LHM.
A new CLI option (
raise_on_warnings
?) would query forSHOW WARNINGS
after each insert batch and fail the migration if warnings are found. This would optionally prevent data loss when e.g.:An equivalent in LHM is
raise_on_warnings
: https://github.com/Shopify/lhm/blob/46204927a2933cfe239c77ac84ab58b5c7deb3a0/lib/lhm/chunker.rb#L92-L100I have a prototype that shows the direction of how this option could be implemented in
Applier.ApplyIterationInsertQuery
: Shopify#1Some open questions:
I'd love to hear your suggestions before we propose a PR contribution, thanks!
The text was updated successfully, but these errors were encountered: