`duplicate key value violates unique constraint "Invocations_pkey"`
nhurden opened this issue · comments
Occasionally BEP uploads fail with:
The Build Event Protocol upload failed: Not retrying publishBuildEvents, no more attempts left:
status='Status{code=UNKNOWN, description=ERROR: duplicate key value violates unique constraint "Invocations_pkey" (SQLSTATE 23505), cause=null}'
UNKNOWN:
UNKNOWN:
ERROR: duplicate key value violates unique constraint "Invocations_pkey" (SQLSTATE 23505)
UNKNOWN:
UNKNOWN:
ERROR: duplicate key value violates unique constraint "Invocations_pkey" (SQLSTATE 23505)
(line breaks added manually)
Logs on the server side point to https://github.com/buildbuddy-io/buildbuddy/blob/v2.12.46/server/util/db/db.go#L759
Using v2.12.46 with postgres
Could this be related to https://github.com/buildbuddy-io/buildbuddy/blob/master/server/util/db/db_cgo.go#L28? Seems to handle MySQL and SQLite but not PostgreSQL.
That looks like a good bet!
I'll add postgres to that function; guess I missed it the first time :P
Should be fixed in the next release by: #4437