action #34525
closedImprove handling of screenshot inserts into the database
Description
Currently the database is throwing errors with insertions to the screenshots table, Since there might be screenshots that are already there, we don't need to add them or change them, and we don't want to waste time figuring out if we do (Database time speaking), is preferred to simply implement postgreSQL specific sentences like ON CONFLICT
clause
This would most likely require to move towards postgreSQL 9.5 at least (And we have version 10 out also already and packaged at obs which is the one where the postgreSQL project points to atm)
2018-04-09 12:35:05 CEST openqa geekotest ERROR: duplicate key value violates unique constraint "screenshots_filename"
2018-04-09 12:35:05 CEST openqa geekotest DETAIL: Key (filename)=(af0/4e2/1ce90e331bdfafa86d652a29b8.png) already exists.
2018-04-09 12:35:05 CEST openqa geekotest STATEMENT: INSERT INTO screenshots ( filename, t_created) VALUES ( $1, $2 ) RETURNING id
2018-04-09 12:35:06 CEST openqa geekotest ERROR: duplicate key value violates unique constraint "screenshots_filename"
2018-04-09 12:35:06 CEST openqa geekotest DETAIL: Key (filename)=(228/607/9ea51a4834202457ecb2760f83.png) already exists.
2018-04-09 12:35:06 CEST openqa geekotest STATEMENT: INSERT INTO screenshots ( filename, t_created) VALUES ( $1, $2 ) RETURNING id
Updated by coolo over 6 years ago
- Priority changed from Normal to High
As this makes reading postgresql logs basically impossible, I raise prio
Last time we had this problem, Marius found that running it in a transaction silences postgresql
Updated by coolo over 6 years ago
https://github.com/os-autoinst/openQA/pull/1711 for reference
Updated by coolo over 6 years ago
- Target version changed from Ready to Current Sprint
Updated by coolo over 6 years ago
- Status changed from New to Resolved
Updated by szarate over 6 years ago
- Target version changed from Current Sprint to Done