fix(event cache): disable order assertions entirely

Until we figure out some panics in production this has caused.
This commit is contained in:
Benjamin Bouvier
2025-07-02 12:01:35 +02:00
parent 9689c4a40a
commit 3c873262c7

View File

@@ -233,6 +233,7 @@ impl RoomEvents {
}
#[cfg(any(test, debug_assertions))]
#[allow(dead_code)] // Temporarily, until we figure out why it's crashing production builds.
fn assert_event_ordering(&self) {
let mut iter = self.chunks.items().enumerate();
let Some((i, (first_event_pos, _))) = iter.next() else {
@@ -266,13 +267,6 @@ impl RoomEvents {
self.order_tracker.flush_updates(false);
#[cfg(any(test, debug_assertions))]
{
// Assert that the orderings are fully correct for all the events present in the
// in-memory linked chunk.
self.assert_event_ordering();
}
updates
}