mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-12 02:44:20 -05: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)
|
rows = await query_function(from_token, upto_token, limit)
|
||||||
updates = [(row[0], row[1:]) for row in rows]
|
updates = [(row[0], row[1:]) for row in rows]
|
||||||
limited = False
|
limited = False
|
||||||
if len(updates) == limit:
|
if len(updates) >= limit:
|
||||||
upto_token = updates[-1][0]
|
upto_token = updates[-1][0]
|
||||||
limited = True
|
limited = True
|
||||||
assert len(updates) <= limit
|
|
||||||
|
|
||||||
return updates, upto_token, limited
|
return updates, upto_token, limited
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user