element-hq / element-hq/synapse

Lots of psql duplicate key errors for `device_uniqueness` and `users_name_key`

Open
#5,961 0 comments 0 reactions 0 assignees View on GitHub
A-Logging T-Task z-p2
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#5961](https://github.com/matrix-org/synapse/issues/5961).

---

We get thousands of these a day:

```
2019-09-02 00:00:03.009 UTC [matrix main] ERROR: duplicate key value violates unique constraint "device_uniqueness"
2019-09-02 00:00:04.622 UTC [matrix main] ERROR: duplicate key value violates unique constraint "users_name_key"
```

They are due (I think) to our poor man's upsert impl, which we should replace with a proper upsert.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.