Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Update black, and run auto formatting over the codebase (#9381) | Eric Eastwood | 2021-02-16 | 3 | -9/+8 |
| | | | | | | | - 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 | ||||
* | Add experimental support for PyPy. (#9123) | Jonathan de Jong | 2021-02-04 | 2 | -6/+8 |
| | | | | * Adds proper dependencies. * Minor fixes in database layer. | ||||
* | Reduce serialization errors in MultiWriterIdGen (#8456) | Erik Johnston | 2020-10-07 | 3 | -1/+36 |
| | | | | | | We call `_update_stream_positions_table_txn` a lot, which is an UPSERT that can conflict in `REPEATABLE READ` isolation level. Instead of doing a transaction consisting of a single query we may as well run it outside of a transaction. | ||||
* | Use SequenceGenerator for state group ID allocation | Richard van der Hoff | 2020-07-16 | 3 | -25/+0 |
| | |||||
* | Fix incorrect error message when database CTYPE was set incorrectly. (#7760) | Richard van der Hoff | 2020-07-01 | 1 | -1/+1 |
| | |||||
* | Persist user interactive authentication sessions (#7302) | Patrick Cloke | 2020-04-30 | 1 | -0/+1 |
| | | | | | By persisting the user interactive authentication sessions to the database, this fixes situations where a user hits different works throughout their auth session and also allows sessions to persist through restarts of Synapse. | ||||
* | Only import sqlite3 when type checking (#7155) | David Vo | 2020-03-27 | 1 | -2/+5 |
| | | | | Fixes: #7127 Signed-off-by: David Vo <david@vovo.id.au> | ||||
* | Add some type annotations in `synapse.storage` (#6987) | Richard van der Hoff | 2020-02-27 | 4 | -23/+117 |
| | | | | | I cracked, and added some type definitions in synapse.storage. | ||||
* | Updated warning for incorrect database collation/ctype (#6985) | Uday Bansal | 2020-02-26 | 1 | -3/+7 |
| | | | Signed-off-by: Uday Bansal <43824981+udaybansal19@users.noreply.github.com> | ||||
* | Warn if postgres database has non-C locale. (#6734) | Erik Johnston | 2020-01-28 | 2 | -0/+47 |
| | | | As using non-C locale can cause issues on upgrading OS. | ||||
* | Refuse to start if sqlite is older than 3.11.0 | Richard van der Hoff | 2020-01-09 | 2 | -4/+7 |
| | |||||
* | Check postgres version in check_database | Richard van der Hoff | 2020-01-09 | 1 | -13/+12 |
| | | | | | this saves doing it on each connection, and will allow us to pass extra options in. | ||||
* | Modify check_database to take a connection rather than a cursor | Richard van der Hoff | 2020-01-09 | 2 | -9/+10 |
| | | | | We might not need the cursor at all. | ||||
* | Add database config class (#6513) | Erik Johnston | 2019-12-18 | 1 | -3/+13 |
| | | | | | This encapsulates config for a given database and is the way to get new connections. | ||||
* | Merge pull request #6156 from matrix-org/erikj/postgres_any | Erik Johnston | 2019-10-10 | 2 | -0/+12 |
|\ | | | | | Use Postgres ANY for selecting many values. | ||||
| * | Fix SQLite | Erik Johnston | 2019-10-10 | 1 | -1/+1 |
| | | |||||
| * | Remove add_in_list_sql_clause | Erik Johnston | 2019-10-10 | 2 | -0/+12 |
| | | |||||
* | | Disable bytes usage with postgres | Erik Johnston | 2019-10-08 | 1 | -0/+7 |
|/ | | | | | | | | More often than not passing bytes to `txn.execute` is a bug (where we meant to pass a string) that just happens to work if `BYTEA_OUTPUT` is set to `ESCAPE`. However, this is a bit of a footgun so we want to instead error when this happens, and force using `bytearray` if we actually want to use bytes. | ||||
* | Fix `devices_last_seen` background update. | Erik Johnston | 2019-09-30 | 2 | -0/+15 |
| | | | | Fixes #6134. | ||||
* | Run Black. (#5482) | Amber Brown | 2019-06-20 | 1 | -1/+1 |
| | |||||
* | Remove Postgres 9.4 support (#5448) | Amber Brown | 2019-06-18 | 1 | -2/+6 |
| | |||||
* | Run black on the rest of the storage module (#4996) | Amber Brown | 2019-04-03 | 3 | -22/+10 |
| | |||||
* | Add database version to phonehome stats. (#4753) | Richard van der Hoff | 2019-02-27 | 2 | -0/+34 |
| | |||||
* | Fix UPSERTs on SQLite 3.24+ (#4477) | Amber Brown | 2019-01-28 | 1 | -7/+3 |
| | |||||
* | Merge branch 'develop' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2019-01-25 | 1 | -2/+1 |
|\ | | | | | | | erikj/sqlite_native_upsert | ||||
| * | Don't require sqlite3 when using postgres (#4466) | Andrew Morgan | 2019-01-25 | 1 | -2/+1 |
| | | |||||
* | | Disable native upserts for sqlite, as they don't work | Erik Johnston | 2019-01-25 | 1 | -3/+7 |
|/ | |||||
* | Use native UPSERTs where possible (#4306) | Amber Brown | 2019-01-24 | 3 | -1/+24 |
| | |||||
* | Port storage/ to Python 3 (#3725) | Amber Brown | 2018-08-31 | 1 | -2/+7 |
| | |||||
* | run isort | Amber Brown | 2018-07-09 | 2 | -6/+5 |
| | |||||
* | Fix pep8 error on psycopg2cffi hack | Richard van der Hoff | 2018-04-10 | 1 | -6/+5 |
| | |||||
* | Use psycopg2cffi module instead of psycopg2 if running on pypy | Vincent Breitmoser | 2018-04-10 | 1 | -1/+7 |
| | | | | | | | The psycopg2 package isn't available for PyPy. This commit adds a check if the runtime is PyPy, and if it is uses psycopg2cffi module in favor of psycopg2. This is almost a drop-in replacement, except for one place where an additional cast to string is required. | ||||
* | Store state groups separately from events (#2784) | Erik Johnston | 2018-02-06 | 2 | -0/+25 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Split state group persist into seperate storage func * Add per database engine code for state group id gen * Move store_state_group to StateReadStore This allows other workers to use it, and so resolve state. * Hook up store_state_group * Fix tests * Rename _store_mult_state_groups_txn * Rename StateGroupReadStore * Remove redundant _have_persisted_state_group_txn * Update comments * Comment compute_event_context * Set start val for state_group_id_seq ... otherwise we try to recreate old state groups * Update comments * Don't store state for outliers * Update comment * Update docstring as state groups are ints | ||||
* | Optionally make committing to postgres asynchronous. | Mark Haines | 2016-06-20 | 3 | -3/+14 |
| | | | | | Useful when running tests when you don't care whether the server will lose data that it claims that it has committed. | ||||
* | Don't require config to create database | Erik Johnston | 2016-04-06 | 3 | -20/+7 |
| | |||||
* | Mark AS users with their AS's ID | Daniel Wagner-Hall | 2016-02-11 | 3 | -6/+9 |
| | |||||
* | Fix flake8 warnings for new flake8 | Daniel Wagner-Hall | 2016-02-02 | 1 | -1/+1 |
| | |||||
* | copyrights | Matthew Hodgson | 2016-01-07 | 4 | -4/+4 |
| | |||||
* | Implement rank function for SQLite FTS | Erik Johnston | 2015-10-23 | 1 | -0/+27 |
| | |||||
* | rename schema_prepare to prepare_database | Erik Johnston | 2015-10-13 | 2 | -2/+2 |
| | |||||
* | Expose error more nicely | Erik Johnston | 2015-10-13 | 2 | -2/+2 |
| | |||||
* | Split out the schema preparation and update logic into its own module | Erik Johnston | 2015-10-13 | 2 | -2/+4 |
| | |||||
* | Remove race condition | Erik Johnston | 2015-05-14 | 2 | -0/+4 |
| | |||||
* | Don't call 'encode_parameter' no-op | Erik Johnston | 2015-05-05 | 2 | -6/+0 |
| | |||||
* | Fix bug where we reconnected to the database on every query. | Erik Johnston | 2015-05-01 | 1 | -1/+1 |
| | |||||
* | Make postgres database error slightly more helpful | Erik Johnston | 2015-04-29 | 1 | -1/+2 |
| | |||||
* | Use __all__ instead of assert to stop pyflakes from warning about unused ↵ | Erik Johnston | 2015-04-29 | 1 | -2/+3 |
| | | | | import in __init__ | ||||
* | Appease PEP8 | Erik Johnston | 2015-04-29 | 1 | -0/+2 |
| | |||||
* | Check that postgres database has correct charset set | Erik Johnston | 2015-04-29 | 4 | -0/+33 |
| | |||||
* | Shuffle operations so that locking upsert happens last in the txn. This ↵ | Erik Johnston | 2015-04-27 | 2 | -0/+6 |
| | | | | ensures the lock is held for the least amount of time possible. | ||||
* | Handle the fact that postgres databases can be restarted from under us | Erik Johnston | 2015-04-27 | 2 | -0/+6 |
| | |||||
* | PEP8 | Erik Johnston | 2015-04-16 | 1 | -2/+0 |
| | |||||
* | Go back to storing JSON in TEXT | Erik Johnston | 2015-04-16 | 2 | -8/+0 |
| | |||||
* | Remove mysql/maria support | Erik Johnston | 2015-04-15 | 2 | -52/+0 |
| | |||||
* | Correctly identify deadlocks | Erik Johnston | 2015-04-15 | 1 | -1/+1 |
| | |||||
* | Add postgres database engine | Erik Johnston | 2015-04-14 | 1 | -0/+44 |
| | |||||
* | Add support for postgres instead of mysql. Change sql accourdingly. blob + ↵ | Erik Johnston | 2015-04-14 | 1 | -0/+2 |
| | | | | varbinary -> bytea. No support for UNSIGNED or CREATE INDEX IF NOT EXISTS. | ||||
* | Use case sensitive collations | Erik Johnston | 2015-04-10 | 1 | -1/+1 |
| | |||||
* | Handle the fact that in sqlite binary data might be stored as unicode or bytes | Erik Johnston | 2015-04-10 | 2 | -1/+11 |
| | |||||
* | Fix maria engine to correctly recognize deadlocks | Erik Johnston | 2015-04-08 | 1 | -2/+2 |
| | |||||
* | Retry on deadlock | Erik Johnston | 2015-04-07 | 2 | -0/+8 |
| | |||||
* | Fix unicode support | Erik Johnston | 2015-04-02 | 3 | -1/+24 |
| | |||||
* | Make work in both Maria and SQLite. Fix tests | Erik Johnston | 2015-04-01 | 3 | -0/+90 |