-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Update to 0.24 : database error #2572
Comments
Ok, I answer to my own issue : it appear that in lib/python2.7/site-packages/synapse/storage/schema/delta/44/expire_url_cache.sql, there is a new query:
The partial index are only supported by sqlite version 3.8.0, whereas the sqlite version in Centos 7 appear to be providing sqlite 3.7. So I had to remove the "where" clause of the query to be able to init and launch my server. |
So, I have a last question : if I manage to install a newer version of sqlite in addition to the old packaged one, is there a way to tell to Matrix the path to the sqlite executable file to use ? |
It's not using the executable, but the library. How you tell python to use the newer library depends on how you installed it, but most likely you'll have to reinstall the sqlite3 python module, pointing it at the right path for the library - or you might be able to get away with the evil hack of specifying an explicit LD_LIBRARY_PATH which prioritises the newer library. sqlite3 is actually part of core python, so to complicate things further you may want to try installing pysqlite instead (and changing your synapse to import pysqlite) to give you more flexibility about which library version it links against. |
Yes, I meant the library, sorry, my mistake ! |
Even worser, the first start (after the upgrade to 0.24) fails and leaves the database in a bad state (at least in my case):
...this is really bad. |
@Linuxine: I solved the issue (on Debian): |
we've made multiple updates to the upgrade script since 0.24.1 to fix various bugs - please can you try on develop? For @Tokodomo's mess, it's trying to apply update 43 twice. The best I can suggest is to back off the changes in 43/user_share.sql (i.e. drop table |
I was hitting this issue as well with the sqlite lib that is shipped in centos 7. the develop branch doesn't fix the upgrade, and i'm still stuck on 0.23.1 until i can get a newer sqlite up or migrate to postgres. |
@erikjohnston says the right fix to this is "i think instead of creating that index directly in the schema file to add a background update that handles the where correctly" - which is a bunch of work. In the interim, unless you're expecting to send lots of images from your HS, you can probably just comment out the index for now from the schema and hopefully the Right Fix will magically sort it out down the line. |
(and if you're expecting to send lots of images from your HS you should be using postgres rather than sqlite anyway, which should work fine) |
@Linuxine unfortunately, i am still seeing the same failure:
|
@jrick Your sqlite version is likely out of date. Try upgrading to 3.8.0 or higher. |
@Linuxine @ara4n
And after that:
So, the only "solution" for me (without messing around) is still: #2572 (comment) |
@turt2live right, this is centos 7 (read: old) with the system sqlite. I wouldn't really bother about this but centos 7 is still in the "install from source" instructions in the readme. Maybe some documentation about needing postgres on centos 7 would be good there. |
I've reported the centos issue here: #2690 The options are to compile a newer version of sqlite manually or to use postgres, unfortunately. |
@jrick if the fix was not with the new version, in my case it must be because I commented the "where" in the index creation, as I indicated in #2572 (comment). Sqlite 3.7 does not support partial indexes it seems. And yes, this is the default sqlite3 version for Centos 7.0. Maybe I have been too daring, I tried to compile directly sqlite 3.20. It would be worth trying with a slightly newer version, like 3.8 for example ? |
This will (I hope) be fixed by #2697 |
This was introduced in #2478 |
I have tried to upgrade my personal homeserver from version 0.23.1 to the 0.24, but the upgrade did not get well, the server won't launch, with the following error:
I have just made as indicated in https://github.com/matrix-org/synapse/blob/master/UPGRADE.rst, made a pip install -upgrade and tried to restart the service.
The text was updated successfully, but these errors were encountered: