-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
sqlite3.OperationalError: no such table: event_txn_id_device_id when upgrading from Docker v1.89.0 to v1.92.2 #16335
Comments
With postgresql, I did end up in a similar situation. I had to revert to 1.89.0, as I do not have docker images for the versions in between available. Before failing, the database was updated, so I was required to restore the previous version from a backup/snapshot. |
Table was added in #15318, back in Synapse 1.83.0. |
Thank you very much @clokep. Is there a practical way to add missing tables to the database? Would my homeserver otherwise be doomed and lost so that I would have to restart from zero under a different name - or use signal only instead of two alternatives? |
I'm not sure how it missed the update to add it, but I haven't actually done any investigation. Can you run |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
It looks like Synapse 1.83.0 did the following operations:
I'm suspicious that bumping the schema version twice isn't safe as we have CI checks which compare if develop is +/- of the PR version. @Anthial The SQL in #16335 (comment) would be interesting to see still. |
Yes! I'm on it! Just trying to figure out the best way of accessing the SQLite database! I figure I might just back it up once more, and use a DB browser to find the required information! (There seems to be a lack of documentation on how to access the SQLite database when utilising Docker) |
Something like?
|
Thanks! It looks like you're missing 3 deltas:
|
Very strange! I wonder how that could have happened! |
Is there anyway to apply these deltas to the database or is it permanently broken? |
You could try to apply them by hand, in order. (And hope no invalid data has occurred in the meantime.) I'd love to know how you database ended up in this state though. |
#11559 seems to describe the concern I have. |
Alright! I'm going to try to run each of these commands (from each of these deltas, including one more, since I also seem to be missing 03_room_membership_index.sql)! Wish me luck! 😁 I really hope this is just, like, a one or two-time occurrence and that most folks manage to avoid this kind of weirdness! |
SQL manually is always a little bit scary BUT IT WORKS! Thank you so much @clokep! You are the best! Feel free to ask if you want to see any kind of logs, and I'll try to get them for you! |
Glad that it worked! I'll poke the team and see if anyone has ideas (there's 1 or 2 things I want to try also.) |
We should be correctly handling jumps in schema versions: synapse/synapse/storage/prepare_database.py Line 424 in 2763c49
There was multiple upgrades and downgrades of schema version in Otherwise, the schema versions seem sane between v1.70.0 and v1.90.0: This shows the schema version at each release, and the new files for each version.
Command: The changes to the schemas (only showing addition/deletions) in the v1.80 to v1.83 range are:
Command: |
As far as I am aware, I did not run the develop branch or any of the prereleases! |
I can't see how this can happen without running the develop branch somehow, though seems like it did. I'm wondering if there was some weird quirk in the setup here? Given no one else is complaining about similar problems, and I don't see a way of progressing this issue, I'm going to close it. If anyone else sees this please shout! |
Description
Messages cannot be sent. When attempting to send a message the server logs a database error.
Steps to reproduce
Note, I do not currently have the capabilities to do this fresh, but assume a normal upgrade path from somewhere around v1.70.
Homeserver
the.eldritch.gift
Synapse Version
v1.92.2
Installation Method
Docker (matrixdotorg/synapse)
Database
SQLite (Docker Default)
Workers
Single process
Platform
Distro: Pop OS 22.04
Hardware:
Configuration
No response
Relevant log output
Anything else that would be useful to know?
I do believe this was also the case for Synapse v1.90.0
The text was updated successfully, but these errors were encountered: