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
{{ message }}
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.
I have two connections to the database using pg_prometheus, which both insert data on the form test_id{sender=nina} id timestamp, to the database with different id values and timestamps. I sometimes, two times out of 5 perhaps, get the following exception:
I have two connections to the database using pg_prometheus, which both insert data on the form
test_id{sender=nina} id timestamp
, to the database with different id values and timestamps. I sometimes, two times out of 5 perhaps, get the following exception:IntegrityError: duplicate key value violates unique constraint "metrics_labels_metric_name_labels_key" DETAIL: Key (metric_name, labels)=(test_id, {"sender": "nina1"}) already exists. CONTEXT: SQL statement " INSERT INTO metrics_labels (metric_name, labels) VALUES ('test_id', '{"sender": "nina1"}') RETURNING id
from the following function:
PL/pgSQL function prometheus.insert_view_normal() line 20 at EXECUTE
Worth noting is that I am using python 3 + psycopg2 lib, using execute_values() with an upsert doing nothing on conflict.
Is the problem at your side, or is it bad timing/my setup/the library I'm using?
Thanks in advance~
The text was updated successfully, but these errors were encountered: