Commit graph libervia-backend/sat/memory/sqlite.py
Author SHA1 Message Date
Goffi
98098105e7 memory (sqlite): minor log improvment 2019-04-26 11:57:26 +02:00
Goffi
621c6b3ffa memory (sqlite): fixed fileUpdate when original value is not set (NULL) 2019-04-26 11:57:26 +02:00
Goffi
4701027950 memory (sqlite): cast timestamp_start filter to float instead of int 2019-04-07 20:57:13 +02:00
Goffi
aac5e58ec6 core (memory/sqlite): display arguments in logs in case of too many db/interaction tries 2019-04-07 18:38:18 +02:00
Goffi
8830a7c1d5 core (memory/sqlite): added a "timestamp_start" filter to retrieve history from a specific point in time 2019-03-09 16:24:15 +01:00
Goffi
d159b9fb49 memory (sqlite): optimizations
indexes were missing on foreign keys for "message", "subject" and "thread" tables, seriously impacting performances.
In addition to those indexes, two indexes have been added to speed ordering by timestamp on "history", and one on "files" table.
history.rowid is not used anymore as there is an index on (profile_id, received_timestamp) which will speed up the query.
Primary keys order has been changed to use automatic index in most common cases (filtering by profile_id then namespace).
2019-01-19 22:49:32 +01:00
Goffi
8e338bf913 date update 2019-01-12 12:25:31 +01:00
Goffi
7a9ee35cfc misc: replaced all "dummy" by the more conventional and readable "__" ("_" being used for gettext) 2019-01-11 11:13:15 +01:00
Goffi
ccfdb695bc memory (sqlite): minor comment move 2019-01-04 09:26:57 +01:00
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)