Project

General

Profile

Actions

action #34525

closed

Improve handling of screenshot inserts into the database

Added by szarate about 6 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
Feature requests
Target version:
Start date:
2018-04-09
Due date:
% Done:

0%

Estimated time:

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
Actions #1

Updated by coolo over 5 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

Actions #3

Updated by coolo over 5 years ago

  • Target version changed from Ready to Current Sprint
Actions #4

Updated by coolo over 5 years ago

  • Assignee set to coolo
Actions #5

Updated by coolo over 5 years ago

  • Status changed from New to Resolved
Actions #6

Updated by szarate over 5 years ago

  • Target version changed from Current Sprint to Done
Actions

Also available in: Atom PDF