summary refs log tree commit diff
path: root/synapse/storage/databases/main/keys.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add some type hints to datastore (#12485)Dirk Klimpel2022-04-271-5/+10
|
* Add missing type hints to synapse.util (#9982)Patrick Cloke2021-05-241-1/+1
|
* 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>`
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-161-2/+1
| | | | | | | - 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-2/+2
|
* Add type hints to the crypto module. (#8999)Patrick Cloke2021-01-041-5/+5
|
* Use autocommit mode for single statement DB functions. (#8542)Erik Johnston2020-10-141-3/+2
| | | | | | | | | | | | | Autocommit means that we don't wrap the functions in transactions, and instead get executed directly. Introduced in #8456. This will help: 1. reduce the number of `could not serialize access due to concurrent delete` errors that we see (though there are a few functions that often cause serialization errors that we don't fix here); 2. improve the DB performance, as it no longer needs to deal with the overhead of `REPEATABLE READ` isolation levels; and 3. improve wall clock speed of these functions, as we no longer need to send `BEGIN` and `COMMIT` to the DB. Some notes about the differences between autocommit mode and our default `REPEATABLE READ` transactions: 1. Currently `autocommit` only applies when using PostgreSQL, and is ignored when using SQLite (due to silliness with [Twisted DB classes](https://twistedmatrix.com/trac/ticket/9998)). 2. Autocommit functions may get retried on error, which means they can get applied *twice* (or more) to the DB (since they are not in a transaction the previous call would not get rolled back). This means that the functions need to be idempotent (or otherwise not care about being called multiple times). Read queries, simple deletes, and updates/upserts that replace rows (rather than generating new values from existing rows) are all idempotent. 3. Autocommit functions no longer get executed in [`REPEATABLE READ`](https://www.postgresql.org/docs/current/transaction-iso.html) isolation level, and so data can change queries, which is fine for single statement queries.
* Convert additional database code to async/await. (#8195)Patrick Cloke2020-08-281-11/+13
|
* Convert calls of async database methods to async (#8166)Patrick Cloke2020-08-271-10/+16
|
* Do not assume calls to runInteraction return Deferreds. (#8133)Patrick Cloke2020-08-201-12/+16
|
* Rename database classes to make some sense (#8033)Erik Johnston2020-08-051-0/+210