perf: Improve gap filling, handle missing auth events better

This commit is contained in:
timedout
2026-06-20 17:07:59 +01:00
parent 0d5aa7ede1
commit eeb937416c
4 changed files with 166 additions and 198 deletions
+5 -5
View File
@@ -1146,16 +1146,16 @@ pub(super) async fn walk_missing_events(
earliest: OwnedEventId,
via: String,
) -> Result {
let earliest_pdu = self.services.rooms.timeline.get_pdu(&earliest).await?;
let latest_pdu = self.services.rooms.timeline.get_pdu(&latest).await?;
let events = self
.services
.rooms
.event_handler
.backfill_missing_events(
earliest_pdu.room_id_or_hash(),
HashSet::from_iter(vec![latest]),
.get_missing_events(
&latest_pdu.room_id_or_hash(),
&latest_pdu,
vec![earliest],
ServerName::parse(via)?,
&ServerName::parse(via)?,
)
.await?;
self.write_str(&format!("Found {} events:\n\n```\n", events.len()))