mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 11:15:01 -04:00
Prevent bundling aggregations for state events (#9619)
There's no need to do aggregation bundling for state events. Doing so can cause performance issues.
This commit is contained in:
parent
1c8a2541da
commit
1b0eaed21f
3 changed files with 9 additions and 2 deletions
1
changelog.d/9619.misc
Normal file
1
changelog.d/9619.misc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Prevent attempting to bundle aggregations for state events in /context APIs.
|
|
@ -685,7 +685,10 @@ class RoomEventContextServlet(RestServlet):
|
||||||
results["events_after"], time_now
|
results["events_after"], time_now
|
||||||
)
|
)
|
||||||
results["state"] = await self._event_serializer.serialize_events(
|
results["state"] = await self._event_serializer.serialize_events(
|
||||||
results["state"], time_now
|
results["state"],
|
||||||
|
time_now,
|
||||||
|
# No need to bundle aggregations for state events
|
||||||
|
bundle_aggregations=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
return 200, results
|
return 200, results
|
||||||
|
|
|
@ -671,7 +671,10 @@ class RoomEventContextServlet(RestServlet):
|
||||||
results["events_after"], time_now
|
results["events_after"], time_now
|
||||||
)
|
)
|
||||||
results["state"] = await self._event_serializer.serialize_events(
|
results["state"] = await self._event_serializer.serialize_events(
|
||||||
results["state"], time_now
|
results["state"],
|
||||||
|
time_now,
|
||||||
|
# No need to bundle aggregations for state events
|
||||||
|
bundle_aggregations=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
return 200, results
|
return 200, results
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue