Bug: Multiple entries in table ObjectVersion with is_head=True
Possibly a race condition since it affects a very small percentage of files eg. 0.1%
Leads to invalid state in those specific docs in which updates are not possible and return a 500 error. Breaks in the code in the queries of type one_or_none
on the table ObjectVersion (key, bucket_id, is_head=True)
https://cern-search-sentry.web.cern.ch/searchaas/edms-search-prod/issues/97112/?query=one_or_none