-
Notifications
You must be signed in to change notification settings - Fork 204
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
Prevent massive database errors on screenshot insertion #2597
Conversation
The previous approach was to catch conflicts on screenshot insertion in perl context yielding the right functional behaviour but also causing a log entry for every image object amounting to multiple gigabytes of postgres database error log files which can cause obvious problems. By using a similar approach as is already done in lib/OpenQA/Schema/Result/Jobs.pm with raw SQL we can ask the database for silent conflict handling and more efficiently not involving perl exception handling. Related progress issue: https://progress.opensuse.org/issues/60926
0725a56
to
f8daf5a
Compare
Codecov Report
@@ Coverage Diff @@
## master #2597 +/- ##
==========================================
+ Coverage 91.57% 91.59% +0.01%
==========================================
Files 181 181
Lines 11233 11226 -7
==========================================
- Hits 10287 10282 -5
+ Misses 946 944 -2
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.
Nice test - have you executed it without the actual code change to see whether it actually works?
of course!
|
Same as previously for screenshots where we fixed the same error in both locations where a DB insertion is done already in os-autoinst#1792 and os-autoinst#2597 we should also prevent expected conflicts to cause an error entry in postgres logs about job modules. This is a followup to ecb7d1d where the unique constraint for job modules was introduced. Related progress issue: https://progress.opensuse.org/issues/60923
Same as previously for screenshots where we fixed the same error in both locations where a DB insertion is done already in os-autoinst#1792 and os-autoinst#2597 we should also prevent expected conflicts to cause an error entry in postgres logs about job modules. This is a followup to ecb7d1d where the unique constraint for job modules was introduced. Related progress issue: https://progress.opensuse.org/issues/60923
Same as previously for screenshots where we fixed the same error in both locations where a DB insertion is done already in os-autoinst#1792 and os-autoinst#2597 we should also prevent expected conflicts to cause an error entry in postgres logs about job modules. This is a followup to ecb7d1d where the unique constraint for job modules was introduced. Related progress issue: https://progress.opensuse.org/issues/60923
Same as previously for screenshots where we fixed the same error in both locations where a DB insertion is done already in os-autoinst#1792 and os-autoinst#2597 we should also prevent expected conflicts to cause an error entry in postgres logs about job modules. This is a followup to ecb7d1d where the unique constraint for job modules was introduced. Related progress issue: https://progress.opensuse.org/issues/60923
Same as previously for screenshots where we fixed the same error in both locations where a DB insertion is done already in os-autoinst#1792 and os-autoinst#2597 we should also prevent expected conflicts to cause an error entry in postgres logs about job modules. This is a followup to ecb7d1d where the unique constraint for job modules was introduced. Related progress issue: https://progress.opensuse.org/issues/60923
Same as previously for screenshots where we fixed the same error in both locations where a DB insertion is done already in os-autoinst#1792 and os-autoinst#2597 we should also prevent expected conflicts to cause an error entry in postgres logs about job modules. This is a followup to ecb7d1d where the unique constraint for job modules was introduced. Related progress issue: https://progress.opensuse.org/issues/60923
Same as previously for screenshots where we fixed the same error in both locations where a DB insertion is done already in os-autoinst#1792 and os-autoinst#2597 we should also prevent expected conflicts to cause an error entry in postgres logs about job modules. This is a followup to ecb7d1d where the unique constraint for job modules was introduced. Related progress issue: https://progress.opensuse.org/issues/60923
Same as previously for screenshots where we fixed the same error in both locations where a DB insertion is done already in os-autoinst#1792 and os-autoinst#2597 we should also prevent expected conflicts to cause an error entry in postgres logs about job modules. This is a followup to ecb7d1d where the unique constraint for job modules was introduced. Related progress issue: https://progress.opensuse.org/issues/60923
The previous approach was to catch conflicts on screenshot insertion in
perl context yielding the right functional behaviour but also causing a
log entry for every image object amounting to multiple gigabytes of
postgres database error log files which can cause obvious problems. By
using a similar approach as is already done in
lib/OpenQA/Schema/Result/Jobs.pm with raw SQL we can ask the database
for silent conflict handling and more efficiently not involving perl
exception handling.
Related progress issue: https://progress.opensuse.org/issues/60926