mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-07 23:44:53 -04:00
fix(event cache): disable order assertions entirely
Until we figure out some panics in production this has caused.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user