Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Increase batch size of bulk_get_push_rules and `_get_joined_profile…
Browse files Browse the repository at this point in the history
…s_from_event_ids`. (#13300)
  • Loading branch information
H-Shay authored Jul 18, 2022
1 parent 15edf23 commit 7864f33
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/13300.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Up batch size of `bulk_get_push_rules` and `_get_joined_profiles_from_event_ids`.
1 change: 1 addition & 0 deletions synapse/storage/databases/main/push_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ async def bulk_get_push_rules(
iterable=user_ids,
retcols=("*",),
desc="bulk_get_push_rules",
batch_size=1000,
)

rows.sort(key=lambda row: (-int(row["priority_class"]), -int(row["priority"])))
Expand Down
2 changes: 1 addition & 1 deletion synapse/storage/databases/main/roommember.py
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ async def _get_joined_profiles_from_event_ids(
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",
)

Expand Down

0 comments on commit 7864f33

Please sign in to comment.