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

Pull out less state when handling gaps mk2 #12852

Merged
merged 15 commits into from
May 26, 2022
Merged
Prev Previous commit
Next Next commit
Update synapse/storage/databases/main/state.py
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
erikjohnston and richvdh authored May 26, 2022
commit 4343d35991f3a722115b60515851c39130d3d5ad
4 changes: 2 additions & 2 deletions synapse/storage/databases/main/state.py
Original file line number Diff line number Diff line change
@@ -182,11 +182,11 @@ def get_metadata_for_events_txn(

result_map: Dict[str, EventMetadata] = {}
for batch_ids in batch_iter(event_ids, 1000):
result_map = await self.db_pool.runInteraction(
result_map.update(await self.db_pool.runInteraction(
"get_metadata_for_events",
get_metadata_for_events_txn,
batch_ids=batch_ids,
)
))

return result_map