summary refs log tree commit diff
path: root/synapse/storage/databases/state (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix a performance issue introduced in Synapse v1.83.0 which meant that ↵reivilibre2023-05-311-0/+31
| | | | | | | | | | | | | purging rooms was very slow and database-intensive. (#15693) * Add indices required to efficiently validate new foreign key constraints on stream_ordering * Newsfile Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org> --------- Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
* Instrument `state` and `state_group` storage related things (tracing) (#15610)Eric Eastwood2023-05-192-0/+20
| | | | | Instrument `state` and `state_group` storage related things (tracing) so it's a little more clear where these database transactions are coming from as there is a lot of wires crossing in these functions. Part of `/messages` performance investigation: https://github.com/matrix-org/synapse/issues/13356
* Include the room ID in more purge room log lines. (#15222)Patrick Cloke2023-03-081-0/+2
|
* Batch up storing state groups when creating new room (#14918)Shay2023-02-241-0/+119
|
* Bump black from 22.12.0 to 23.1.0 (#15103)dependabot[bot]2023-02-222-6/+2
|
* Move `StateFilter` to `synapse.types` (#14668)David Robertson2022-12-122-2/+2
| | | | | * Move `StateFilter` to `synapse.types` * Changelog
* Optimize `filter_events_for_client` for faster `/messages` - v2 (#14527)Eric Eastwood2022-11-221-20/+79
| | | Fix #14108
* Cancel the processing of key query requests when they time out. (#13680)reivilibre2022-09-071-0/+3
|
* Make DictionaryCache have better expiry properties (#13292)Erik Johnston2022-07-211-1/+8
|
* Reduce memory usage of state group cache (#13323)Erik Johnston2022-07-191-1/+2
|
* Don't pull out the full state when storing state (#13274)Erik Johnston2022-07-151-53/+103
|
* Add a unique index to `state_group_edges` to prevent duplicates being ↵reivilibre2022-05-191-0/+16
| | | | accidentally introduced and the consequential impact to performance. (#12687)
* Refactor `resolve_state_groups_for_events` to not pull out full state when ↵Shay2022-05-181-1/+1
| | | | no state resolution happens. (#12775)
* Back out in-flight state caching changes. (#12126)reivilibre2022-03-021-218/+25
|
* Order in-flight state group queries in biggest-first order (#11610)reivilibre2022-03-011-3/+27
| | | Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
* Cap the number of in-flight requests for state from a single group (#11608)reivilibre2022-02-221-0/+16
|
* Track and deduplicate in-flight requests to `_get_state_for_groups`. (#10870)reivilibre2022-02-181-25/+178
| | | Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
* Replace uses of simple_insert_many with simple_insert_many_values. (#11742)Patrick Cloke2022-01-132-28/+14
| | | | This should be (slightly) more efficient and it is simpler to have a single method for inserting multiple values.
* Fix remove_stale_pushers job on SQLite. (#10843)reivilibre2021-09-201-3/+3
|
* Add type hints to state database module. (#10823)Patrick Cloke2021-09-152-69/+127
|
* Add type hints to state handler. (#10482)Patrick Cloke2021-07-261-6/+11
|
* Reorganise the database schema directories (#9932)Richard van der Hoff2021-05-0710-233/+0
| | | | | The hope here is that by moving all the schema files into synapse/storage/schema, it gets a bit easier for newcomers to navigate. It certainly got easier for me to write a helpful README. There's more to do on that front, but I'll follow up with other PRs for that.
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-143-3/+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>`
* Bugbear: Add Mutable Parameter fixes (#9682)Jonathan de Jong2021-04-082-3/+7
| | | | | | | Part of #9366 Adds in fixes for B006 and B008, both relating to mutable parameter lint errors. Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>
* Add type hints to DictionaryCache and TTLCache. (#9442)Patrick Cloke2021-03-291-4/+5
|
* Refactor to ensure we call check_consistency (#9470)Erik Johnston2021-02-241-4/+6
| | | The idea here is to stop people forgetting to call `check_consistency`. Folks can still just pass in `None` to the new args in `build_sequence_generator`, but hopefully they won't.
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-161-3/+3
| | | | | | | - 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 Cloke2021-02-121-1/+1
|
* Use execute_batch in more places (#9188)Erik Johnston2021-01-211-2/+2
| | | | | * Use execute_batch in more places * Newsfile
* Mypy fixes for `synapse.handlers.federation` (#8422)Richard van der Hoff2020-09-291-2/+2
| | | For some reason, an apparently unrelated PR upset mypy about this module. Here are a number of little fixes.
* Add checks for postgres sequence consistency (#8402)Erik Johnston2020-09-281-0/+3
|
* Simplify super() calls to Python 3 syntax. (#8344)Patrick Cloke2020-09-182-2/+2
| | | | | | | This converts calls like super(Foo, self) -> super(). Generated with: sed -i "" -Ee 's/super\([^\(]+\)/super()/g' **/*.py
* Convert state and stream stores and related code to async (#8194)Patrick Cloke2020-08-281-13/+13
|
* Converts event_federation and registration databases to async/await (#8061)Patrick Cloke2020-08-111-11/+7
|
* Rename database classes to make some sense (#8033)Erik Johnston2020-08-0513-0/+1267