Trace how much work is being done while "recursively fetching redactions" (#18854)
Spawning from observing this trace for a `/messages` request (`RoomMessageListRestServlet`). We don't know if it took a while for the database to fetch a single redaction or a whole chain of redactions.
This commit is contained in:
parent
356cc4a0a1
commit
68068de3a4
1
changelog.d/18854.misc
Normal file
1
changelog.d/18854.misc
Normal file
@ -0,0 +1 @@
|
||||
Trace how much work is being done while "recursively fetching redactions".
|
||||
@ -1338,6 +1338,7 @@ class EventsWorkerStore(SQLBaseStore):
|
||||
fetched_event_ids: Set[str] = set()
|
||||
fetched_events: Dict[str, _EventRow] = {}
|
||||
|
||||
@trace
|
||||
async def _fetch_event_ids_and_get_outstanding_redactions(
|
||||
event_ids_to_fetch: Collection[str],
|
||||
) -> Collection[str]:
|
||||
@ -1345,6 +1346,10 @@ class EventsWorkerStore(SQLBaseStore):
|
||||
Fetch all of the given event_ids and return any associated redaction event_ids
|
||||
that we still need to fetch in the next iteration.
|
||||
"""
|
||||
set_tag(
|
||||
SynapseTags.FUNC_ARG_PREFIX + "event_ids_to_fetch.length",
|
||||
str(len(event_ids_to_fetch)),
|
||||
)
|
||||
row_map = await self._enqueue_events(event_ids_to_fetch)
|
||||
|
||||
# we need to recursively fetch any redactions of those events
|
||||
|
||||
Loading…
Reference in New Issue
Block a user