summary refs log tree commit diff
path: root/synapse/storage/databases/main/events.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/storage/databases/main/events.py')
-rw-r--r--synapse/storage/databases/main/events.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/storage/databases/main/events.py b/synapse/storage/databases/main/events.py

index 18def01f50..788158199c 100644 --- a/synapse/storage/databases/main/events.py +++ b/synapse/storage/databases/main/events.py
@@ -178,6 +178,8 @@ class PersistEventsStore: ) persist_event_counter.inc(len(events_and_contexts)) + logger.debug("Finished persisting 1") + if not backfilled: # backfilled events have negative stream orderings, so we don't # want to set the event_persisted_position to that. @@ -185,6 +187,8 @@ class PersistEventsStore: events_and_contexts[-1][0].internal_metadata.stream_ordering ) + logger.debug("Finished persisting 2") + for event, context in events_and_contexts: if context.app_service: origin_type = "local" @@ -198,6 +202,8 @@ class PersistEventsStore: event_counter.labels(event.type, origin_type, origin_entity).inc() + logger.debug("Finished persisting 3") + for room_id, new_state in current_state_for_room.items(): self.store.get_current_state_ids.prefill((room_id,), new_state) @@ -206,6 +212,9 @@ class PersistEventsStore: (room_id,), list(latest_event_ids) ) + logger.debug("Finished persisting 4") + logger.debug("Finished persisting 5") + async def _get_events_which_are_prevs(self, event_ids: Iterable[str]) -> List[str]: """Filter the supplied list of event_ids to get those which are prev_events of existing (non-outlier/rejected) events.