-
Notifications
You must be signed in to change notification settings - Fork 13.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: reuse existing row on dual write if available #20661
fix: reuse existing row on dual write if available #20661
Conversation
a1238b0
to
3b59914
Compare
3b59914
to
84910b6
Compare
Codecov Report
@@ Coverage Diff @@
## master #20661 +/- ##
==========================================
+ Coverage 66.82% 66.86% +0.03%
==========================================
Files 1752 1752
Lines 65616 65574 -42
Branches 6938 6938
==========================================
- Hits 43849 43845 -4
+ Misses 20007 19969 -38
Partials 1760 1760
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable... I hope we can finalize the migration and get rid of this code soon-ish.
SUMMARY
We're seeing some integrity errors
on import.
To avoid a duplicate primary key violation, I'm copying the existing row from the database instead of copying just the id and trying to use Sqlalchemy to merge the data since the add/merge functionality isn't in this module.
TESTING INSTRUCTIONS
This is an intermittent error and difficult to reproduce but happens for some people on import.
ADDITIONAL INFORMATION