1
0

TODO and asserts

This commit is contained in:
Eric Eastwood
2024-09-06 15:26:13 -05:00
parent 27caa47c50
commit 333b4721be

View File

@@ -2178,6 +2178,14 @@ class EventsBackgroundUpdatesStore(StreamWorkerStore, StateDeltasStore, SQLBaseS
# These should go hand-in-hand
assert last_to_insert_membership_info is not None
# Sanity check that our tokens are in order. We should be iterating in
# ascending order.
assert (
last_to_insert_membership_info.membership_event_stream_ordering
<= membership_event_stream_ordering
)
# TODO: This only works if someone is from the server is participating in the room.
state_deltas_since_last_snapshot = await self.get_current_state_deltas_for_room(
room_id,
# From the last snapshot we inserted