summary refs log tree commit diff
path: root/synapse/storage/devices.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2017-04-04 10:07:57 +0100
committerGitHub <noreply@github.com>2017-04-04 10:07:57 +0100
commit27cc627e425a4a1d6baf3887b435005a571c2271 (patch)
treea5fa797ac7e65f85cae52cccd88451e5672257c6 /synapse/storage/devices.py
parentMerge pull request #2095 from matrix-org/rav/cull_log_preserves (diff)
parentMerge branch 'develop' of github.com:matrix-org/synapse into erikj/repl_tcp_s... (diff)
downloadsynapse-27cc627e425a4a1d6baf3887b435005a571c2271.tar.xz
Merge pull request #2082 from matrix-org/erikj/repl_tcp_server
Replace HTTP replication with TCP replication (Server side part)
Diffstat (limited to 'synapse/storage/devices.py')
-rw-r--r--synapse/storage/devices.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/devices.py b/synapse/storage/devices.py
index 53e36791d5..c8d5f5ba8b 100644
--- a/synapse/storage/devices.py
+++ b/synapse/storage/devices.py
@@ -533,7 +533,7 @@ class DeviceStore(SQLBaseStore):
         rows = yield self._execute("get_user_whose_devices_changed", None, sql, from_key)
         defer.returnValue(set(row[0] for row in rows))
 
-    def get_all_device_list_changes_for_remotes(self, from_key):
+    def get_all_device_list_changes_for_remotes(self, from_key, to_key):
         """Return a list of `(stream_id, user_id, destination)` which is the
         combined list of changes to devices, and which destinations need to be
         poked. `destination` may be None if no destinations need to be poked.
@@ -541,11 +541,11 @@ class DeviceStore(SQLBaseStore):
         sql = """
             SELECT stream_id, user_id, destination FROM device_lists_stream
             LEFT JOIN device_lists_outbound_pokes USING (stream_id, user_id, device_id)
-            WHERE stream_id > ?
+            WHERE ? < stream_id AND stream_id <= ?
         """
         return self._execute(
             "get_all_device_list_changes_for_remotes", None,
-            sql, from_key,
+            sql, from_key, to_key
         )
 
     @defer.inlineCallbacks