This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Message retention expiry causes 'Duplicate key value violates unique constraint "event_relations_id"' #7693
Labels
z-bug
(Deprecated Label)
Description
Running synapse homeserver, with freshly created DB, ends up with database integrity errors appearing in the logs after a few days. In usage, these appear as timeline backfill failing to fill in beyond 1-2 days back. The (experimental) retention feature is enabled, might have to do with this.
Error traceback:
Steps to reproduce
Create an account and join
#synapse:matrix.org
using RiotLog out and wait for a few days.
Log in and try scrolling upward on #synapse. The room timeline can be scrolled a few days back (1-2 days, not the 7 days in the retention config), but at some point backfilling stops working, and it will just show a spinner that never completes
In the server logs, observe the database integrity errors and resulting backfill failure messages
I have double checked that postgres db was created using the correct encoding options. The issue seems quite reproducible: I've dropped the server DB several times and started from scratch, and it seems to occur every time. Did not test if it occurs with retention disabled, but suspect not.
Version information
The text was updated successfully, but these errors were encountered: