To improve login performance, we want to clear excluded data
(i.e. trash and spam lists, old data) from the offline storage after the login.
We also want to activate "auto_vacuum = incremental" for the offline storage database
in order to allow for faster vacuum execution and run "incremental_vacuum" before
the database is closed.
Fixes#4723
Add ownerGroup column to offline db.
We detect the relationship change by the update of the user. We track
current user in cache storage because it already was receiving it in
case of offline storage and storage already had appropriate lifecycle
for it.
We empty the tables instead of migrating them because we want to remove
them anyway due to corruption (see #4664)
fix#2874
fix#4344
When the database file was corrupted or got out of sync with the key
then it wasn't handled in any way, we would just fall back to the
ephemeral cache.
Now we delete the database and create it again, there's nothing else
we can do.
fix#4382
When adding another account that would override existing stored
credential we would generate a new database key but we would try to
use it with the old database.
Now instead we are forcing the creation of new database and delete
the old one directly from the worker.
When there is a model change on the server that would conflict with
the entities stored in the offline database, we need to do a migration
We generate some model diffs with the code generator and use them
for a compile-time check.
Co-authored-by: ivk <ivk@tutao.de>
2022-05-25 16:30:34 +02:00
Renamed from test/tests/api/worker/rest/OfflineStorageTest.ts (Browse further)