This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Duplicate key violation when persisting read markers #7469
Comments
This violation theoretically shouldn't occur normally as the code will delete any rows with matching (room_id, receipt_type, user_id) before attempting to insert: synapse/synapse/storage/data_stores/main/receipts.py Lines 394 to 415 in 509e381
Could I have some more information about your database?
Additionally, for each of these errors, are the room_id/user_id combination always the same? If so, does executing SELECT * FROM receipts_linearized WHERE room_id = '!******.chuch.tools' AND receipt_type = 'm.read' AND user_id = '@*****:chat.church.tools'; on your database bring up more than one row? |
|
it's probably just a race from two requests setting the read marker at once? Possibly that delete and insert should be an upsert? |
anoadragon453
added
z-bug
(Deprecated Label)
z-p3
(Deprecated Label)
and removed
info-needed
labels
May 22, 2020
anoadragon453
changed the title
Error for read marker
Duplicate key violation when persisting read markers
May 22, 2020
4 tasks
ilmari
added a commit
to ilmari/synapse
that referenced
this issue
May 31, 2020
Fixes matrix-org#7469 Signed-off-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
erikjohnston
pushed a commit
that referenced
this issue
Jun 1, 2020
Fixes #7469 Signed-off-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
phil-flex
pushed a commit
to phil-flex/synapse
that referenced
this issue
Jun 16, 2020
Fixes matrix-org#7469 Signed-off-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
In the homeserver.log i have some requests with error code 500.
Most of them look like that:
One log message is more detailed. I'm not sure if they are related:
These errors happen sometime but i'm not able to reproduce them by myself.
I guess it's a bug, because it is a 500 internal server error.
Version information
What version of Synapse is running?
Version: 1.12.3
Install method: package manager
Platform: vm
The text was updated successfully, but these errors were encountered: