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
|
@ -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