Increase batch size of bulk_get_push_rules and _get_joined_profiles_from_event_ids. (#13300)

This commit is contained in:
Shay 2022-07-18 13:15:23 -07:00 committed by GitHub
parent 15edf23626
commit 7864f33e28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

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

@ -0,0 +1 @@
Up batch size of `bulk_get_push_rules` and `_get_joined_profiles_from_event_ids`.

View File

@ -228,6 +228,7 @@ class PushRulesWorkerStore(
iterable=user_ids,
retcols=("*",),
desc="bulk_get_push_rules",
batch_size=1000,
)
rows.sort(key=lambda row: (-int(row["priority_class"]), -int(row["priority"])))

View File

@ -904,7 +904,7 @@ class RoomMemberWorkerStore(EventsWorkerStore):
iterable=event_ids,
retcols=("user_id", "display_name", "avatar_url", "event_id"),
keyvalues={"membership": Membership.JOIN},
batch_size=500,
batch_size=1000,
desc="_get_joined_profiles_from_event_ids",
)