diff options
author | Erik Johnston <erik@matrix.org> | 2016-09-08 16:18:01 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-09-08 16:18:01 +0100 |
commit | 5beda10bbdeeed4d5535c726f32e18d5c09f2553 (patch) | |
tree | 6e657ab96f8e4bcfd7efe652aee4675b2090b6c8 /synapse/storage/background_updates.py | |
parent | Merge branch 'master' of github.com:matrix-org/synapse into develop (diff) | |
download | synapse-5beda10bbdeeed4d5535c726f32e18d5c09f2553.tar.xz |
Reindex state_groups_state after pruning
Diffstat (limited to 'synapse/storage/background_updates.py')
-rw-r--r-- | synapse/storage/background_updates.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/storage/background_updates.py b/synapse/storage/background_updates.py index 30d0e4c5dc..003f5ba203 100644 --- a/synapse/storage/background_updates.py +++ b/synapse/storage/background_updates.py @@ -133,10 +133,12 @@ class BackgroundUpdateStore(SQLBaseStore): updates = yield self._simple_select_list( "background_updates", keyvalues=None, - retcols=("update_name",), + retcols=("update_name", "depends_on"), ) + in_flight = set(update["update_name"] for update in updates) for update in updates: - self._background_update_queue.append(update['update_name']) + if update["depends_on"] not in in_flight: + self._background_update_queue.append(update['update_name']) if not self._background_update_queue: # no work left to do |