-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
psycopg2.errors.UniqueViolation: could not create unique index "receipts_graph_unique_index" #14123
Comments
Introduced in #13753 |
Duplicates #14120. |
Err, that's not true. Likely related though! |
@MTRNord Can you run the following and let me know what it returns: SELECT thread_id FROM receipts_graph WHERE room_id = '!watercooler-v9:maunium.net' AND receipt_type = 'm.read' AND user_id = '@cat:feline.support' (The expectation is that it returns a single row, which is null.) Did you ever enable experimental support for MSC3771 or MSC3773? Let's also take a look at the indexes on that table currently? SELECT indexname, indexdef FROM pg_indexes WHERE tablename = 'receipts_graph' ORDER BY indexname; |
It would also be good to see if the backfill has completed yet: select * from background_updates; |
I had neither of the 2 MSCs activated. The output of the query is:
|
I hope those help. The error seems to happen anytime I restart synapse. |
@MTRNord Sorry for the delay, I missed the notification here. I'm not really sure how you got multiple of the same receipt in there, maybe the indexes weren't added in quite the proper order by the code. Receipts are mostly transient so I think the easiest thing might be to nuke receipts from that user in that room (once they send a new receipt it should process fine). The user-facing impact of this is that your client wouldn't show their avatar in the timeline until they send a new receipt. DELETE FROM receipts_graph WHERE room_id = '!watercooler-v9:maunium.net' AND receipt_type = 'm.read' AND user_id = '@cat:feline.support'; (Alternately you could try to inspect the two returned rows and try to figure out which is "older" and only delete that one. There's a |
Thanks, I will just nuke that receipt entirely. In the end, there anyway will be a new one eventually :) |
Hopefully it is just the one duplicate entry! 👍 Do shout if it works for you (and sorry for the inconvenience...) |
Yes, there were just 2 entries deleted by that command (it's missing the word |
I'm going to consider this OK. Let me know if you're still seeing an issue. |
It seems like this is coming back for me again :/ same error but this time my own local user instead. |
We're planning to fix the background update automatically in 1.72.0. Tracked in #14406. |
Description
It seems like it has some unique index issue for me.
Steps to reproduce
I have no idea :/
Homeserver
matrix.midnightthoughts.space
Synapse Version
{"server_version":"1.68.0","python_version":"3.9.14"}
Installation Method
Docker (matrixdotorg/synapse)
Platform
Running in docker/kubernetes/cri-o on a gentoo system.
Relevant log output
Anything else that would be useful to know?
It seems to try a few times and then aborts trying. This happens on several restarts.
The text was updated successfully, but these errors were encountered: