Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Convert all namedtuples to attrs. (#11665) | Patrick Cloke | 2021-12-30 | 1 | -4/+1 |
| | | | To improve type hints throughout the code. | ||||
* | Add type hints to `synapse/storage/databases/main/events_worker.py` (#11411) | Sean Quah | 2021-11-26 | 1 | -1/+1 |
| | | | | Also refactor the stream ID trackers/generators a bit and try to document them better. | ||||
* | Add remaining type hints to `synapse.events`. (#11098) | Patrick Cloke | 2021-11-02 | 1 | -1/+1 |
| | |||||
* | Annotate `log_function` decorator (#10943) | reivilibre | 2021-10-27 | 1 | -2/+3 |
| | | | Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> | ||||
* | `disallow-untyped-defs` for `synapse.state` (#11004) | David Robertson | 2021-10-06 | 1 | -1/+1 |
| | | | | | * `disallow-untyped-defs` for `synapse.state` Much smaller than I was expecting! | ||||
* | Factor out a separate `EventContext.for_outlier` (#10883) | Richard van der Hoff | 2021-09-22 | 1 | -30/+4 |
| | | | | | | Constructing an EventContext for an outlier is actually really simple, and there's no sense in going via an `async` method in the `StateHandler`. This also means that we can resolve a bunch of FIXMEs. | ||||
* | Add type hints to state handler. (#10482) | Patrick Cloke | 2021-07-26 | 1 | -11/+15 |
| | |||||
* | Update the MSC3083 support to verify if joins are from an authorized server. ↵ | Patrick Cloke | 2021-07-26 | 1 | -4/+8 |
| | | | | (#10254) | ||||
* | Use inline type hints in various other places (in `synapse/`) (#10380) | Jonathan de Jong | 2021-07-15 | 1 | -9/+11 |
| | |||||
* | Use get_current_users_in_room from store and not StateHandler (#9910) | Erik Johnston | 2021-05-05 | 1 | -3/+7 |
| | |||||
* | Remove `synapse.types.Collection` (#9856) | Richard van der Hoff | 2021-04-22 | 1 | -1/+2 |
| | | | This is no longer required, since we have dropped support for Python 3.5. | ||||
* | Remove redundant "coding: utf-8" lines (#9786) | Jonathan de Jong | 2021-04-14 | 1 | -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>` | ||||
* | Add type hints to expiring cache. (#9730) | Patrick Cloke | 2021-04-06 | 1 | -2/+3 |
| | |||||
* | Update black, and run auto formatting over the codebase (#9381) | Eric Eastwood | 2021-02-16 | 1 | -4/+10 |
| | | | | | | | - 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 | ||||
* | Fix some typos. | Patrick Cloke | 2021-02-12 | 1 | -1/+1 |
| | |||||
* | Precompute joined hosts and store in Redis (#9198) | Erik Johnston | 2021-01-26 | 1 | -3/+8 |
| | |||||
* | Pass room_id to get_auth_chain_difference (#8879) | Erik Johnston | 2020-12-04 | 1 | -2/+2 |
| | | | | | This is so that we can choose which algorithm to use based on the room ID. | ||||
* | Fix typos and spelling errors. (#8639) | Patrick Cloke | 2020-10-23 | 1 | -1/+1 |
| | |||||
* | Enable mypy checking for unreachable code and fix instances. (#8432) | Patrick Cloke | 2020-10-01 | 1 | -1/+1 |
| | |||||
* | Report state res metrics to Prometheus and log | Richard van der Hoff | 2020-09-29 | 1 | -20/+124 |
| | |||||
* | Move Measure calls into `resolve_events_with_store` | Richard van der Hoff | 2020-09-29 | 1 | -32/+31 |
| | |||||
* | Move `resolve_events_with_store` into StateResolutionHandler | Richard van der Hoff | 2020-09-29 | 1 | -45/+47 |
| | |||||
* | Improve logging of state resolution (#8371) | Richard van der Hoff | 2020-09-23 | 1 | -48/+16 |
| | | | | | | | | | | I'd like to get a better insight into what we are doing with respect to state res. The list of state groups we are resolving across should be short (if it isn't, that's a massive problem in itself), so it should be fine to log it in ite entiretly. I've done some grepping and found approximately zero cases in which the "shortcut" code delivered the result, so I've ripped that out too. | ||||
* | Use slots in attrs classes where possible (#8296) | Patrick Cloke | 2020-09-14 | 1 | -1/+1 |
| | | | | | slots use less memory (and attribute access is faster) while slightly limiting the flexibility of the class attributes. This focuses on objects which are instantiated "often" and for short periods of time. | ||||
* | Stop sub-classing object (#8249) | Patrick Cloke | 2020-09-04 | 1 | -4/+4 |
| | |||||
* | Define StateMap as immutable and add a MutableStateMap type. (#8183) | Patrick Cloke | 2020-08-28 | 1 | -12/+20 |
| | |||||
* | Add type hints for state. (#8140) | Patrick Cloke | 2020-08-24 | 1 | -70/+122 |
| | |||||
* | Convert events worker database to async/await. (#8071) | Patrick Cloke | 2020-08-18 | 1 | -1/+1 |
| | |||||
* | Rename database classes to make some sense (#8033) | Erik Johnston | 2020-08-05 | 1 | -1/+1 |
| | |||||
* | Convert state resolution to async/await (#7942) | Patrick Cloke | 2020-07-24 | 1 | -53/+42 |
| | |||||
* | Yield during large v2 state res. (#7735) | Erik Johnston | 2020-06-24 | 1 | -1/+5 |
| | | | | | | | | | | | 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 iteritems/itervalues/iterkeys with native versions. (#7692) | Patrick Cloke | 2020-06-15 | 1 | -12/+10 |
| | |||||
* | Allow configuration of Synapse's cache without using synctl or environment ↵ | Amber Brown | 2020-05-11 | 1 | -3/+1 |
| | | | | variables (#6391) | ||||
* | Improve get auth chain difference algorithm. (#7095) | Erik Johnston | 2020-03-18 | 1 | -20/+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 Johnston | 2020-02-19 | 1 | -5/+10 |
| | | | | | | 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. | ||||
* | s/get_room_version/get_room_version_id/ | Richard van der Hoff | 2020-01-31 | 1 | -1/+1 |
| | | | | | ... to make way for a forthcoming get_room_version which returns a RoomVersion object. | ||||
* | Add StateMap type alias (#6715) | Erik Johnston | 2020-01-16 | 1 | -2/+3 |
| | |||||
* | sanity-checking for events used in state res (#6531) | Richard van der Hoff | 2019-12-13 | 1 | -11/+21 |
| | | | | | | | When we perform state resolution, check that all of the events involved are in the right room. | ||||
* | Prevent redacted events from appearing in message search (#6377) | Andrew Morgan | 2019-12-11 | 1 | -1/+2 |
| | |||||
* | Fix bug which caused rejected events to be stored with the wrong room state ↵ | Richard van der Hoff | 2019-11-06 | 1 | -89/+83 |
| | | | | | | | | | | | | (#6320) Fixes a bug where rejected events were persisted with the wrong state group. Also fixes an occasional internal-server-error when receiving events over federation which are rejected and (possibly because they are backwards-extremities) have no prev_group. Fixes #6289. | ||||
* | Improve documentation for EventContext fields (#6319) | Richard van der Hoff | 2019-11-05 | 1 | -0/+3 |
| | |||||
* | Port to use state storage | Erik Johnston | 2019-10-30 | 1 | -5/+8 |
| | |||||
* | add some metrics on the federation sender (#6160) | Richard van der Hoff | 2019-10-03 | 1 | -6/+18 |
| | |||||
* | Remove double return statements (#5962) | Andrew Morgan | 2019-09-03 | 1 | -1/+0 |
| | | | | | | | | | | Remove all the "double return" statements which were a result of us removing all the instances of ``` defer.returnValue(...) return ``` statements when we switched to python3 fully. | ||||
* | Replace returnValue with return (#5736) | Amber Brown | 2019-07-23 | 1 | -20/+18 |
| | |||||
* | Move logging utilities out of the side drawer of util/ and into logging/ (#5606) | Amber Brown | 2019-07-04 | 1 | -1/+1 |
| | |||||
* | Merge branch 'develop' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2019-06-20 | 1 | -66/+41 |
|\ | | | | | | | erikj/histogram_extremities | ||||
| * | Run Black. (#5482) | Amber Brown | 2019-06-20 | 1 | -66/+41 |
| | | |||||
* | | Add descriptions and remove redundant set(..) | Erik Johnston | 2019-06-19 | 1 | -1/+2 |
| | | |||||
* | | Only count non-cache state resolution | Erik Johnston | 2019-06-18 | 1 | -3/+3 |
| | | |||||
* | | Use consistent buckets | Erik Johnston | 2019-06-18 | 1 | -1/+1 |
| | | |||||
* | | Add metric fo number of state groups in resolution | Erik Johnston | 2019-06-17 | 1 | -0/+10 |
|/ | |||||
* | Fix grammar and document get_current_users_in_room (#4998) | Andrew Morgan | 2019-04-03 | 1 | -2/+13 |
| | |||||
* | Collect room-version variations into one place (#4969) | Richard van der Hoff | 2019-04-01 | 1 | -11/+5 |
| | | | | 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. | ||||
* | Enable room version v3 | Erik Johnston | 2019-01-29 | 1 | -1/+1 |
| | |||||
* | Drop vdh support | Erik Johnston | 2019-01-29 | 1 | -1/+1 |
| | |||||
* | Pass through room version to event auth | Erik Johnston | 2019-01-25 | 1 | -1/+1 |
| | |||||
* | Add v2 room version | Erik Johnston | 2018-12-18 | 1 | -1/+3 |
| | |||||
* | Add helpers for getting prev and auth events (#4139) | Erik Johnston | 2018-11-06 | 1 | -1/+1 |
| | | | | | | | * Add helpers for getting prev and auth events This is in preparation for allowing the event format to change between room versions. | ||||
* | Add STATE_V2_TEST room version | Erik Johnston | 2018-11-01 | 1 | -1/+1 |
| | |||||
* | Rename resolve_events_with_factory | Erik Johnston | 2018-10-24 | 1 | -7/+7 |
| | |||||
* | Add v2 state res algorithm. | Erik Johnston | 2018-10-16 | 1 | -18/+69 |
| | | | | We hook this up to the vdh test room version. | ||||
* | Fix some instances of ExpiringCache not expiring cache items | Erik Johnston | 2018-09-21 | 1 | -9/+0 |
| | | | | | | | | ExpiringCache required that `start()` be called before it would actually start expiring entries. A number of places didn't do that. This PR removes `start` from ExpiringCache, and automatically starts backround reaping process on creation instead. | ||||
* | Remove unnecessary resolve_events_with_state_map | Erik Johnston | 2018-08-22 | 1 | -28/+6 |
| | | | | | We only ever used the synchronous resolve_events_with_state_map in one place, which is trivial to replace with the async version. | ||||
* | Merge branch 'develop' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2018-08-20 | 1 | -3/+3 |
| | | | | erikj/refactor_state_handler | ||||
* | Remove redundant room_version checks | Erik Johnston | 2018-08-20 | 1 | -14/+3 |
| | |||||
* | Add fast path in state res for zero prev events | Erik Johnston | 2018-08-09 | 1 | -1/+6 |
| | |||||
* | Choose state algorithm based on room version | Erik Johnston | 2018-08-09 | 1 | -11/+93 |
| | |||||
* | Refactor state module | Erik Johnston | 2018-08-09 | 1 | -0/+574 |
We split out the actual state resolution algorithm to prepare for having multiple versions. |