Page MenuHomeSoftware Heritage

Vault: cannot recook failed bundles
Closed, MigratedEdits Locked

Description

2018-02-15 15:39:43 [7278] [ERROR] duplicate key value violates unique constraint "vault_bundle_type_object_id_key"
DETAIL:  Key (type, object_id)=(revision_gitfast, \xcf26cbe61e3fba59cec4a01a8ad74bbc70233456) already exists.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/swh/core/api_async.py", line 41, in middleware_handler
    return (yield from handler(request))
  File "/usr/lib/python3.5/asyncio/coroutines.py", line 210, in coro
    res = func(*args, **kw)
  File "/usr/lib/python3/dist-packages/swh/vault/api/server.py", line 84, in vault_cook
    email=email, sticky=sticky)
  File "/usr/lib/python3/dist-packages/swh/vault/backend.py", line 80, in wrapped
    ret = fn(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/swh/vault/backend.py", line 223, in cook_request
    self.create_task(obj_type, obj_id, sticky)
  File "/usr/lib/python3/dist-packages/swh/vault/backend.py", line 80, in wrapped
    ret = fn(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/swh/vault/backend.py", line 186, in create_task
    VALUES (%s, %s, %s)''', (obj_type, obj_id, sticky))
  File "/usr/lib/python3/dist-packages/psycopg2/extras.py", line 223, in execute
    return super(RealDictCursor, self).execute(query, vars)
psycopg2.IntegrityError: duplicate key value violates unique constraint "vault_bundle_type_object_id_key"
DETAIL:  Key (type, object_id)=(revision_gitfast, \xcf26cbe61e3fba59cec4a01a8ad74bbc70233456) already exists.

This is weird, because we always delete failed bundle before retrying them.