summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2020-05-01 09:25:16 +0100
committerGitHub <noreply@github.com>2020-05-01 09:25:16 +0100
commitb2dba0607944107990883618672d639f0614c492 (patch)
tree45d9c0c15b1054ecafcfbcb9a2a0f153342b38d8 /synapse
parentPersist user interactive authentication sessions (#7302) (diff)
downloadsynapse-b2dba0607944107990883618672d639f0614c492.tar.xz
Workaround for assertion errors from db_query_to_update_function (#7378)
Hopefully this is no worse than what we have on master...
Diffstat (limited to 'synapse')
-rw-r--r--synapse/replication/tcp/streams/_base.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/synapse/replication/tcp/streams/_base.py b/synapse/replication/tcp/streams/_base.py
index 4ae3cffb1e..4af1afd119 100644
--- a/synapse/replication/tcp/streams/_base.py
+++ b/synapse/replication/tcp/streams/_base.py
@@ -176,10 +176,9 @@ def db_query_to_update_function(
         rows = await query_function(from_token, upto_token, limit)
         updates = [(row[0], row[1:]) for row in rows]
         limited = False
-        if len(updates) == limit:
+        if len(updates) >= limit:
             upto_token = updates[-1][0]
             limited = True
-        assert len(updates) <= limit
 
         return updates, upto_token, limited