Duplicate userRefId causing lockup on a parallel upload
When adaptive training pods and uag pods are scaled, it is possible to create duplicate entry for UserRef
entity. The query then looks for a single entry, so duplicated entries will crash the query.