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
to_device messages get lost due to to_device stream id not being saved #6311
Labels
z-bug
(Deprecated Label)
Comments
richvdh
changed the title
to_device token not saved
to_device messages get lost due to to_device stream id not being saved
Oct 31, 2019
We probably want to go and audit all tables that expect to have a row in them. The easiest fix for this is probably to upsert rather than update. Now that we have native upsert support that should not have too much of a performance penalty. |
This was referenced Nov 14, 2019
Err, actually I'll wait until that PR is closed huh. |
This should be fixed for this specific instance by #6555
synapse/synapse/storage/data_stores/main/schema/full_schemas/54/stream_positions.sql Line 2 in 8568704
|
This was referenced Sep 6, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In schema delta 35, synapse added an entry into the
device_max_stream_id
table (https://github.com/matrix-org/synapse/blob/develop/synapse/storage/data_stores/main/schema/delta/35/device_stream_id.sql). Full schema 54 has now been cut which means this schema delta file isn't being run for new installs as of 1.0 (when full schema 54 was released) so it looks like these synapse installs never get an entry indevice_max_stream_id
. It's written to by anUPDATE
clause so no entry is created if one doesn't already exist.It doesn't look like it gets created anywhere else. If not, this means the device stream token resets any time synapse is restarted which causes to_device messages to go missing, causing Unable To Decrypt errors.
Same bug may apply to
appservice_stream
as that appears to do the same thingThe text was updated successfully, but these errors were encountered: