This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Description
An interesting bug I found while investigating #6683:
When figuring out which topological token to start a purge job at, we need to do the following:
- Figure out a timestamp before which events will be purged
- Select the first stream ordering after that timestamp
- Select info about the first event after that stream ordering
- Build a topological token from that info
In some situations (e.g. quiet rooms with a short max_lifetime), there not be an event after the stream ordering at step 3, therefore we abort the purge with the error No event found.