From 3c873262c703848ba7743c19b10b7c1d5cf72b9c Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Wed, 2 Jul 2025 12:01:35 +0200 Subject: [PATCH] fix(event cache): disable order assertions entirely Until we figure out some panics in production this has caused. --- crates/matrix-sdk/src/event_cache/room/events.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/crates/matrix-sdk/src/event_cache/room/events.rs b/crates/matrix-sdk/src/event_cache/room/events.rs index 9b5664f3a..83b9066fc 100644 --- a/crates/matrix-sdk/src/event_cache/room/events.rs +++ b/crates/matrix-sdk/src/event_cache/room/events.rs @@ -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 }