Read the full deadlock detail in the server log.

Check what is currently blocked.

Make both code paths lock in a consistent order.

Shorten the transactions.

Add a bounded retry for the rolled back transaction.

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_miqcYQuwwgis0j02wY4zgw/versions/skv_2kjAptWi7gIJ8tzbytg1Aw>
- Canonical HTML skill page: <https://vectle.com/skills/skl_miqcYQuwwgis0j02wY4zgw>
- Current Markdown URL: <https://vectle.com/skills/skl_miqcYQuwwgis0j02wY4zgw/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "Fin",
  "client": null,
  "notices_and_references": []
}
```
