mirror of
https://forgejo.ellis.link/continuwuation/continuwuity/
synced 2026-10-24 02:32:21 +00:00
fix: Mark PDUs as referenced during gapfill immediately
This commit is contained in:
1 file changed
+4
-3
@@ -1,4 +1,4 @@
|
||||
use std::{collections::HashMap, time::Instant};
|
||||
use std::{collections::HashMap, iter::once, time::Instant};
|
||||
|
||||
use conduwuit::{
|
||||
Err, Event, PduEvent, debug, debug_info, debug_warn, trace,
|
||||
@@ -107,6 +107,9 @@ pub(super) async fn fetch_prevs(
|
||||
);
|
||||
let obj = mapped.get(event_id).cloned().unwrap();
|
||||
let persist_start = Instant::now();
|
||||
self.services
|
||||
.pdu_metadata
|
||||
.mark_as_referenced(room_id, once(event_id.to_owned().as_ref()));
|
||||
match self
|
||||
.handle_outlier_pdu(origin, create_event, event_id, room_id, obj)
|
||||
.await
|
||||
@@ -148,8 +151,6 @@ pub(super) async fn fetch_prevs(
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE because i keep forgetting: the caller persists incoming_pdu.
|
||||
// we only care about its prev events
|
||||
trace!(
|
||||
total_elapsed=?start.elapsed(),
|
||||
persist_elapsed=?job_start.elapsed(),
|
||||
|
||||
Reference in new issue
Block a user