summary refs log tree commit diff
path: root/tests/state (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Yield during large v2 state res. (#7735)Erik Johnston2020-06-241-0/+9
| | | | | | | | | | | State res v2 across large data sets can be very CPU intensive, and if all the relevant events are in the cache the algorithm will run from start to finish within a single reactor tick. This can result in blocking the reactor tick for several seconds, which can have major repercussions on other requests. To fix this we simply add the occaisonal `sleep(0)` during iterations to yield execution until the next reactor tick. The aim is to only do this for large data sets so that we don't impact otherwise quick resolutions.=
* Replace all remaining six usage with native Python 3 equivalents (#7704)Dagfinn Ilmari Mannsåker2020-06-161-2/+0
|
* Improve get auth chain difference algorithm. (#7095)Erik Johnston2020-03-181-5/+8
| | | | | | | | | | | It was originally implemented by pulling the full auth chain of all state sets out of the database and doing set comparison. However, that can take a lot work if the state and auth chains are large. Instead, lets try and fetch the auth chains at the same time and calculate the difference on the fly, allowing us to bail early if all the auth chains converge. Assuming that the auth chains do converge more often than not, this should improve performance. Hopefully.
* Reduce auth chains fetched during v2 state res. (#6952)Erik Johnston2020-02-191-2/+4
| | | | | | The state res v2 algorithm only cares about the difference between auth chains, so we can pass in the known common state to the `get_auth_chain` storage function so that it can ignore those events.
* Add a `make_event_from_dict` method (#6858)Richard van der Hoff2020-02-071-2/+2
| | | | | | | ... and use it in places where it's trivial to do so. This will make it easier to pass room versions into the FrozenEvent constructors.
* sanity-checking for events used in state res (#6531)Richard van der Hoff2019-12-131-0/+3
| | | | | | | When we perform state resolution, check that all of the events involved are in the right room.
* Run Black. (#5482)Amber Brown2019-06-201-10/+10
|
* Run Black on the tests again (#5170)Amber Brown2019-05-101-165/+39
|
* Collect room-version variations into one place (#4969)Richard van der Hoff2019-04-011-3/+4
| | | | Collect all the things that make room-versions different to one another into one place, so that it's easier to define new room versions.
* Pass through room version to event authErik Johnston2019-01-251-1/+3
|
* Add helpers for getting prev and auth events (#4139)Erik Johnston2018-11-061-1/+1
| | | | | | | * Add helpers for getting prev and auth events This is in preparation for allowing the event format to change between room versions.
* Fix None exception in state res v2Erik Johnston2018-11-021-2/+98
|
* isortErik Johnston2018-10-241-4/+1
|
* Rename resolve_events_with_factoryErik Johnston2018-10-241-2/+2
|
* Add some state res v2 testsErik Johnston2018-10-162-0/+666