mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Workaround for assertion errors from db_query_to_update_function (#7378)
Hopefully this is no worse than what we have on master...
This commit is contained in:
parent
627b0f5f27
commit
b2dba06079
1
changelog.d/7378.misc
Normal file
1
changelog.d/7378.misc
Normal file
@ -0,0 +1 @@
|
||||
Move catchup of replication streams logic to worker.
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user