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:
Richard van der Hoff 2020-05-01 09:25:16 +01:00 committed by GitHub
parent 627b0f5f27
commit b2dba06079
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

1
changelog.d/7378.misc Normal file
View File

@ -0,0 +1 @@
Move catchup of replication streams logic to worker.

View File

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