summary refs log tree commit diff
path: root/tests/storage/test_event_federation.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Stop writing to `event_reference_hashes` (#12679)Richard van der Hoff2022-05-101-9/+0
| | | | | This table is never read, since #11794. We stop writing to it; in future we can drop it altogether.
* Remove `HomeServer.get_datastore()` (#12031)Richard van der Hoff2022-02-231-1/+1
| | | | | | | The presence of this method was confusing, and mostly present for backwards compatibility. Let's get rid of it. Part of #11733
* Implement MSC3706: partial state in `/send_join` response (#11967)Richard van der Hoff2022-02-121-4/+4
| | | | | | | | | | | | * Make `get_auth_chain_ids` return a Set It has a set internally, and a set is often useful where it gets used, so let's avoid converting to an intermediate list. * Minor refactors in `on_send_join_request` A little bit of non-functional groundwork * Implement MSC3706: partial state in /send_join response
* Fix logic for dropping old events in fed queue (#11806)Andrew Morgan2022-01-241-6/+24
| | | | Co-authored-by: Brendan Abolivier <babolivier@matrix.org> Co-authored-by: Richard van der Hoff <richard@matrix.org>
* Replace uses of simple_insert_many with simple_insert_many_values. (#11742)Patrick Cloke2022-01-131-10/+16
| | | | This should be (slightly) more efficient and it is simpler to have a single method for inserting multiple values.
* Remove redundant `COALESCE()`s around `COUNT()`s in database queries (#11570)Sean Quah2021-12-141-1/+1
| | | | | `COUNT()` never returns `NULL`. A `COUNT(*)` over 0 rows is 0 and a `COUNT(NULL)` is also 0.
* Prune inbound federation queues if they get too long (#10390)Erik Johnston2021-08-021-0/+57
|
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-1/+0
| | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
* Use the chain cover index in get_auth_chain_ids. (#9576)Patrick Cloke2021-03-101-3/+73
| | | | This uses a simplified version of get_chain_cover_difference to calculate auth chain of events.
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-161-3/+14
| | | | | | | - Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version
* Use a chain cover index to efficiently calculate auth chain difference (#8868)Erik Johnston2021-01-111-24/+225
|
* Pass room_id to get_auth_chain_difference (#8879)Erik Johnston2020-12-041-8/+10
| | | | | This is so that we can choose which algorithm to use based on the room ID.
* Correctly handle unpersisted events when calculating auth chain difference. ↵Erik Johnston2020-12-021-0/+5
| | | | | | | | | (#8827) We do state res with unpersisted events when calculating the new current state of the room, so that should be the only thing impacted. I don't think this is tooooo big of a deal as: 1. the next time a state event happens in the room the current state should correct itself; 2. in the common case all the unpersisted events' auth events will be pulled in by other state, so will still return the correct result (or one which is sufficiently close to not affect the result); and 3. we mostly use the state at an event to do important operations, which isn't affected by this.
* Rename database classes to make some sense (#8033)Erik Johnston2020-08-051-7/+9
|
* Improve get auth chain difference algorithm. (#7095)Erik Johnston2020-03-181-17/+140
| | | | | | | | | | | 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.
* Remove unused get_prev_events_and_hashes_for_roomRichard van der Hoff2020-01-061-13/+6
|
* rename get_prev_events_for_room to get_prev_events_and_hashes_for_roomRichard van der Hoff2020-01-061-2/+2
| | | | ... to make way for a new method which just returns the event ids
* Move DB pool and helper functions into dedicated Database classErik Johnston2019-12-051-4/+4
|
* Fix postgres unit testsErik Johnston2019-10-101-1/+1
|
* Fix dummy event insertion consent bug (#6053)Neil Johnson2019-09-261-0/+40
| | | Fixes #5905
* Run Black. (#5482)Amber Brown2019-06-201-7/+7
|
* Fix tests on postgresql (#3740)Amber Brown2018-09-041-3/+3
|
* Run tests under PostgreSQL (#3423)Amber Brown2018-08-131-1/+1
|
* Run black.black2018-08-101-15/+24
|
* Test fixes for Python 3 (#3647)Amber Brown2018-08-091-1/+1
|
* Avoid creating events with huge numbers of prev_eventsRichard van der Hoff2018-04-161-0/+68
In most cases, we limit the number of prev_events for a given event to 10 events. This fixes a particular code path which created events with huge numbers of prev_events.