Print out the actual number of affected rows

pull/6310/head
Brendan Abolivier 2019-11-01 12:07:05 +00:00
parent 824bba2f78
commit 3b29a73f9f
No known key found for this signature in database
GPG Key ID: 1E015C145F1916CD
1 changed files with 4 additions and 4 deletions

View File

@ -527,7 +527,7 @@ class EventsBackgroundUpdatesStore(BackgroundUpdateStore):
rows = self.cursor_to_dict(txn)
if not rows:
return True
return True, 0
for row in rows:
event_id = row["event_id"]
@ -550,13 +550,13 @@ class EventsBackgroundUpdatesStore(BackgroundUpdateStore):
# We want to return true (to end the background update) only when
# the query returned with less rows than we asked for.
return len(rows) != batch_size
return len(rows) != batch_size, len(rows)
end = yield self.runInteraction(
end, num_rows = yield self.runInteraction(
desc="event_store_labels", func=_event_store_labels_txn
)
if end:
yield self._end_background_update("event_store_labels")
return batch_size
return num_rows