summary refs log tree commit diff
path: root/synapse/storage/background_updates.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Check database in has_completed_background_updatesRichard van der Hoff2017-11-221-2/+25
| | | | so that the right thing happens on workers.
* Fix error on sqlite 3.7Richard van der Hoff2017-11-211-1/+11
| | | | | | | | | | | Create the url_cache index on local_media_repository as a background update, so that we can detect whether we are on sqlite or not and create a partial or complete index accordingly. To avoid running the cleanup job before we have built the index, add a bailout which will defer the cleanup if the bg updates are still running. Fixes https://github.com/matrix-org/synapse/issues/2572.
* Make __init__ consitstent across Store heirarchyRichard van der Hoff2017-11-131-2/+2
| | | | | | Add db_conn parameters to the `__init__` methods of the *Store classes, so that they are all consistent, which makes the multiple inheritance work correctly (and so that we can later extract mixins which can be used in the slavedstores)
* replace 'except:' with 'except Exception:'Richard van der Hoff2017-10-231-1/+1
| | | | what could possibly go wrong
* Don't create event_search index on sqliteRichard van der Hoff2017-05-111-3/+10
| | | | ... because the table is virtual
* Add an index to event_searchRichard van der Hoff2017-05-111-3/+7
| | | | - to make the purge API quicker
* Fix bgupdate error if index already exists (#2167)Richard van der Hoff2017-04-271-30/+53
| | | | | | | | | When creating a new table index in the background, guard against it existing already. Fixes https://github.com/matrix-org/synapse/issues/2135. Also, make sure we restore the autocommit flag when we're done, otherwise we get more failures from other operations later on. Fixes https://github.com/matrix-org/synapse/issues/1890 (hopefully).
* Remove broken use of clock.call_laterRichard van der Hoff2017-03-181-12/+3
| | | | | | | | | background_updates was using `call_later` in a way that leaked the logcontext into the reactor. We could have rewritten it to do it properly, but given that we weren't using the fancier facilities provided by `call_later`, we might as well just use `async.sleep`, which does the logcontext stuff properly.
* Add WHERE clause support to index creationErik Johnston2016-09-121-9/+15
|
* Reindex state_groups_state after pruningErik Johnston2016-09-081-2/+4
|
* fix: defer.returnValue takes one argumentMark Haines2016-07-251-1/+1
|
* background updates: fix assert againRichard van der Hoff2016-07-251-1/+1
|
* background updates: Fix assertion to do somethingRichard van der Hoff2016-07-251-2/+2
|
* Fix background_update testsRichard van der Hoff2016-07-251-7/+20
| | | | | | A bit of a cleanup for background_updates, and make sure that the real background updates have run before we start the unit tests, so that they don't interfere with the tests.
* Create index on user_ips in the backgroundRichard van der Hoff2016-07-221-7/+66
| | | | | | | | user_ips is kinda big, so really we want to add the index in the background once we're running. Replace the schema delta with one which will do that. I've done this in a way that's reasonably easy to reuse as there a few other indexes I need, and I don't suppose they will be the last.
* Simplify query and handle finishing correctlyErik Johnston2016-04-221-1/+2
|
* copyrightsMatthew Hodgson2016-01-071-1/+1
|
* Fix the background updateMark Haines2015-11-111-5/+8
|
* Run the background updates when starting synapse.Mark Haines2015-11-101-7/+50
|
* Add storage module for tracking background updates.Mark Haines2015-11-091-0/+210
The progress for each background update is stored as a JSON blob in the database. Each background update is broken up into separate batches. The batch size is automatically tuned to try avoid blocking single threaded databases for too long.