Commit graph libervia-backend/sat/memory/sqlite.py
Author SHA1 Message Date
Goffi
610e88841a memory (sqlite): retry _runInteraction in the same way as for _runQuery, this improve reliability 2019-01-04 09:21:16 +01:00
Goffi
6e38be1dab core (memory/sqlite): new delPrivateNamespace method to delete all data of a specific namespace for a profile. 2019-01-02 18:25:55 +01:00
Goffi
0e70587857 core (memory/sqlite): further improvments in update_v7:
- "info" messages deletion is now done by deactivating foreign keys. This seriously boost performances.
- "VACUUM" is done at the end to reduce database size.
2018-12-12 00:53:14 +01:00
Goffi
82d16029b8 core (memory/sqlite): fixed v7 update performance issue:
Performance issue was due to bad ordering in table dropping, this has been fixed.
"infos" message are also deleted by this update as they are containing only presence data and take a lot of space for a barely useful data.
A config option may be available in the future to store presence data in logs.
2018-12-11 23:53:27 +01:00
Goffi
51bc3411ba core (memory/sqlite): do not call commitStatements if there is nothing to commit in checkUpdates 2018-12-10 21:06:20 +01:00
Goffi
c2d7c3e69e core (memory/sqlite): changed history constraint
/!\ Database schema change /!\
History was using a unique constraint on `profile_id, timestamp, source, dest, source_res, dest_res`, which can cause trouble because several messages send quickly by the same person can have a common timestamp (specially with delayed messages where precision is second), resulting in message loss.
The new constraint use `profile_id, stanza_id, source, dest` where `stanza_id` is XEP-0359 stanza_id, so it's unique by definition, and no message should be lost anymore.
Because sqlite doesn't support altering table with a constraint change, we have to create new tables and copy old data to new one, which can be pretty long.
Sqlite update mechanism with "specifics" has been fixed when several updates are applied (e.g. moving from v5 to v7) and a specific is in the workflow.
2018-12-09 14:07:26 +01:00
Goffi
35e15c664c plugin XEP-0045: MAM implementation for MUC 2018-12-07 19:13:28 +01:00
Goffi
a245e32391 core (memory/sqlite): skip a line before debug log showing statements 2018-12-01 14:39:35 +01:00
Goffi
0b8e750956 core (memory/sqlite): added stanza_id:
/!\ database schema change /!\
stanza_id is a new field in history added to prepare the implementation of MAM for messages.
A new "last_stanza_id" can be used in filters to retrieve last message with a know stanza id (useful for history synchronisation).
2018-12-01 10:08:17 +01:00
Goffi
80ef13612b core, setup: huge cleaning:
- moved directories from src and frontends/src to sat and sat_frontends, which is the recommanded naming convention
- move twisted directory to root
- removed all hacks from setup.py, and added missing dependencies, it is now clean
- use https URL for website in setup.py
- removed "Environment :: X11 Applications :: GTK", as wix is deprecated and removed
- renamed sat.sh to sat and fixed its installation
- added python_requires to specify Python version needed
- replaced glib2reactor which use deprecated code by gtk3reactor

sat can now be installed directly from virtualenv without using --system-site-packages anymore \o/
2018-04-02 19:44:50 +02:00
Renamed from src/memory/sqlite.py (Browse further)