diff options
author | Nick Mills-Barrett <nick@beeper.com> | 2023-05-18 19:37:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-18 14:37:31 -0400 |
commit | ad50510a06d035a674f0eeed5db5dd3060bc0b1c (patch) | |
tree | b2b8110f0d5e223a0bd28d5f4e4a8acac1e7dcd1 /synapse/storage | |
parent | Update Mutual Rooms (MSC2666) implementation (#15621) (diff) | |
download | synapse-ad50510a06d035a674f0eeed5db5dd3060bc0b1c.tar.xz |
Handle missing previous read marker event. (#15464)
If the previous read marker is pointing to an event that no longer exists (e.g. due to retention) then assume that the newly given read marker is newer.
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/databases/main/events_worker.py | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/synapse/storage/databases/main/events_worker.py b/synapse/storage/databases/main/events_worker.py index 53aa5933d5..a39bc90974 100644 --- a/synapse/storage/databases/main/events_worker.py +++ b/synapse/storage/databases/main/events_worker.py @@ -1973,12 +1973,6 @@ class EventsWorkerStore(SQLBaseStore): return rows, to_token, True - async def is_event_after(self, event_id1: str, event_id2: str) -> bool: - """Returns True if event_id1 is after event_id2 in the stream""" - to_1, so_1 = await self.get_event_ordering(event_id1) - to_2, so_2 = await self.get_event_ordering(event_id2) - return (to_1, so_1) > (to_2, so_2) - @cached(max_entries=5000) async def get_event_ordering(self, event_id: str) -> Tuple[int, int]: res = await self.db_pool.simple_select_one( |