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

Increase batch size of bulk_get_push_rules and _get_joined_profiles_from_event_ids. #13300

Merged
merged 2 commits into from
Jul 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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