summary refs log tree commit diff
path: root/synapse/storage/search.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-11-10 16:20:13 +0000
committerMark Haines <mark.haines@matrix.org>2015-11-10 16:20:13 +0000
commit90b503216c40974dc4925a9bbb673779a039143c (patch)
tree24f81e8e46b97f67d459a4afc4d807cb30336d41 /synapse/storage/search.py
parentTest for background updates (diff)
downloadsynapse-90b503216c40974dc4925a9bbb673779a039143c.tar.xz
Use a background task to update databases to use the full text search
Diffstat (limited to '')
-rw-r--r--synapse/storage/search.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/storage/search.py b/synapse/storage/search.py
index d170c546b5..3b19b118eb 100644
--- a/synapse/storage/search.py
+++ b/synapse/storage/search.py
@@ -37,8 +37,8 @@ class SearchStore(BackgroundUpdateStore):
 
     @defer.inlineCallbacks
     def _background_reindex_search(self, progress, batch_size):
-        target_min_stream_id = progress["target_min_stream_id"]
-        max_stream_id = progress["max_stream_id"]
+        target_min_stream_id = progress["target_min_stream_id_inclusive"]
+        max_stream_id = progress["max_stream_id_exclusive"]
         rows_inserted = progress.get("rows_inserted", 0)
 
         INSERT_CLUMP_SIZE = 1000
@@ -105,8 +105,8 @@ class SearchStore(BackgroundUpdateStore):
                 txn.execute_many(sql, clump)
 
             progress = {
-                "target_max_stream_id": target_min_stream_id,
-                "max_stream_id": min_stream_id,
+                "target_min_stream_id_inclusive": target_min_stream_id,
+                "max_stream_id_exclusive": min_stream_id,
                 "rows_inserted": rows_inserted + len(event_search_rows)
             }