summary refs log tree commit diff
path: root/synapse/storage/databases (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * Convert additional databases to async/await part 2 (#8200)Patrick Cloke2020-09-0110-50/+90
| |
| * Move and rename `get_devices_with_keys_by_user` (#8204)Richard van der Hoff2020-09-013-48/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move `get_devices_with_keys_by_user` to `EndToEndKeyWorkerStore` this seems a better fit for it. This commit simply moves the existing code: no other changes at all. * Rename `get_devices_with_keys_by_user` to better reflect what it does. * get_device_stream_token abstract method To avoid referencing fields which are declared in the derived classes, make `get_device_stream_token` abstract, and define that in the classes which define `_device_list_id_gen`.
| * Rename `get_e2e_device_keys` to better reflect its purpose (#8205)Richard van der Hoff2020-08-291-14/+6
| | | | | | | | | | | | | | | | | | | | | | ... and to show that it does something slightly different to `_get_e2e_device_keys_txn`. `include_all_devices` and `include_deleted_devices` were never used (and `include_deleted_devices` was broken, since that would cause `None`s in the result which were not handled in the loop below. Add some typing too.
* | Merge commit 'd2ac767de' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-1/+1
|\| | | | | | | | | | | | | * commit 'd2ac767de': Convert ReadWriteLock to async/await. (#8202) Fix incorrect return signature Fix `wait_for_stream_position` for multiple waiters. (#8196)
| * Fix incorrect return signatureAndrew Morgan2020-08-281-1/+1
| |
* | Merge commit 'd58fda99f' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-204-163/+169
|\| | | | | | | | | | | * commit 'd58fda99f': Convert `event_push_actions`, `registration`, and `roommember` datastores to async (#8197) Only return devices with keys from `/federation/v1/user/devices/` (#8198)
| * Convert `event_push_actions`, `registration`, and `roommember` datastores to ↵Patrick Cloke2020-08-283-160/+168
| | | | | | | | async (#8197)
| * Only return devices with keys from `/federation/v1/user/devices/` (#8198)Richard van der Hoff2020-08-281-3/+1
| | | | | | | | | | There's not much point in returning all the others, and some people have a silly number of devices.
* | Merge commit 'aec708517' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-204-36/+41
|\| | | | | | | | | | | * commit 'aec708517': Convert state and stream stores and related code to async (#8194) Ensure that the OpenID Connect remote ID is a string. (#8190)
| * Convert state and stream stores and related code to async (#8194)Patrick Cloke2020-08-284-36/+41
| |
* | Merge commit '5c03134d0' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-207-157/+221
|\| | | | | | | | | | | | | * commit '5c03134d0': Convert additional database code to async/await. (#8195) Define StateMap as immutable and add a MutableStateMap type. (#8183) Move and refactor LoginRestServlet helper methods (#8182)
| * Convert additional database code to async/await. (#8195)Patrick Cloke2020-08-287-157/+221
| |
* | Merge commit 'b49a5b930' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-202-48/+49
|\| | | | | | | | | * commit 'b49a5b930': Convert stats and related calls to async/await (#8192)
| * Convert stats and related calls to async/await (#8192)Patrick Cloke2020-08-272-48/+49
| |
* | Merge commit 'b71d4a094' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-202-27/+30
|\| | | | | | | | | * commit 'b71d4a094': Convert simple_delete to async/await. (#8191)
| * Convert simple_delete to async/await. (#8191)Patrick Cloke2020-08-272-27/+30
| |
* | Merge commit '9b7ac03af' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-2011-76/+104
|\| | | | | | | | | | | | | * commit '9b7ac03af': Convert calls of async database methods to async (#8166) simple_search_list_txn should return None, not 0. (#8187) Fix missing _add_persisted_position (#8179)
| * Convert calls of async database methods to async (#8166)Patrick Cloke2020-08-2711-74/+103
| |
* | Merge commit '30426c706' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-203-13/+18
|\| | | | | | | | | * commit '30426c706': Convert additional database methods to async (select list, search, insert_many, delete_*) (#8168)
| * Convert additional database methods to async (select list, search, ↵Patrick Cloke2020-08-273-13/+18
| | | | | | | | insert_many, delete_*) (#8168)
* | Merge commit '4a739c73b' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-2011-72/+99
|\| | | | | | | | | * commit '4a739c73b': Convert simple_update* and simple_select* to async (#8173)
| * Convert simple_update* and simple_select* to async (#8173)Patrick Cloke2020-08-2711-72/+99
| |
* | Merge commit 'a466b6797' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-2015-88/+104
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a466b6797': Reduce run-times of tests by advancing the reactor less (#7757) Update debian systemd service to use Type=notify (#8169) Remove remaining is_guest argument uses from get_room_data calls (#8181) Do not propagate typing notifications from shadow-banned users. (#8176) Remove unused parameter from, and add safeguard in, get_room_data (#8174) Add required Debian dependencies to allow docker builds on the arm platform (#8144) Allow running mypy directly. (#8175) Update the test federation client to handle streaming responses (#8130) Do not propagate profile changes of shadow-banned users into rooms. (#8157) Make SlavedIdTracker.advance have same interface as MultiWriterIDGenerator (#8171) Convert simple_select_one and simple_select_one_onecol to async (#8162)
| * Make SlavedIdTracker.advance have same interface as MultiWriterIDGenerator ↵Erik Johnston2020-08-261-2/+2
| | | | | | | | (#8171)
| * Convert simple_select_one and simple_select_one_onecol to async (#8162)Patrick Cloke2020-08-2615-67/+86
| |
* | Merge commit '56efa9ec7' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-2019-121/+218
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '56efa9ec7': (22 commits) Fix rate limiting unit tests. (#8167) Add functions to `MultiWriterIdGen` used by events stream (#8164) Do not allow send_nonmember_event to be called with shadow-banned users. (#8158) Changelog fixes Make StreamIdGen `get_next` and `get_next_mult` async (#8161) Wording fixes to 'name' user admin api filter (#8163) Fix missing double-backtick in RST document Search in columns 'name' and 'displayname' in the admin users endpoint (#7377) Add type hints for state. (#8140) Stop shadow-banned users from sending non-member events. (#8142) Allow capping a room's retention policy (#8104) Add healthcheck for default localhost 8008 port on /health endpoint. (#8147) Fix flaky shadow-ban tests. (#8152) Don't fail /submit_token requests on incorrect session ID if request_token_inhibit_3pid_errors is turned on (#7991) Do not apply ratelimiting on joins to appservices (#8139) Micro-optimisations to get_auth_chain_ids (#8132) Allow denying or shadow banning registrations via the spam checker (#8034) Stop shadow-banned users from sending invites. (#8095) Be more tolerant of membership events in unknown rooms (#8110) Improve the error code when trying to register using a name reserved for guests. (#8135) ...
| * Make StreamIdGen `get_next` and `get_next_mult` async (#8161)Erik Johnston2020-08-2512-44/+48
| | | | | | | | This is mainly so that `StreamIdGenerator` and `MultiWriterIdGenerator` will have the same interface, allowing them to be used interchangeably.
| * Wording fixes to 'name' user admin api filter (#8163)Andrew Morgan2020-08-251-1/+1
| | | | | | Some fixes to wording I noticed after merging #7377.
| * Search in columns 'name' and 'displayname' in the admin users endpoint (#7377)Manuel Stahl2020-08-251-12/+19
| | | | | | | | | | * Search in columns 'name' and 'displayname' in the admin users endpoint Signed-off-by: Manuel Stahl <manuel.stahl@awesome-technologies.de>
| * Don't fail /submit_token requests on incorrect session ID if ↵Brendan Abolivier2020-08-241-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | request_token_inhibit_3pid_errors is turned on (#7991) * Don't raise session_id errors on submit_token if request_token_inhibit_3pid_errors is set * Changelog * Also wait some time before responding to /requestToken * Incorporate review * Update synapse/storage/databases/main/registration.py Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> * Incorporate review Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
| * Micro-optimisations to get_auth_chain_ids (#8132)Richard van der Hoff2020-08-211-23/+17
| |
| * Allow denying or shadow banning registrations via the spam checker (#8034)Patrick Cloke2020-08-202-1/+63
| |
| * Be more tolerant of membership events in unknown rooms (#8110)Richard van der Hoff2020-08-201-6/+25
| | | | | | | | It turns out that not all out-of-band membership events are labelled as such, so we need to be more accepting here.
| * Use the JSON encoder without whitespace in more places. (#8124)Patrick Cloke2020-08-204-16/+12
| |
| * Add more types to synapse.storage.database. (#8127)Patrick Cloke2020-08-201-3/+8
| |
* | Merge commit '76c43f086' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-203-22/+26
|\| | | | | | | | | * commit '76c43f086': Do not assume calls to runInteraction return Deferreds. (#8133)
| * Do not assume calls to runInteraction return Deferreds. (#8133)Patrick Cloke2020-08-203-22/+26
| |
* | Merge commit '12aebdfa5' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-1/+10
|\| | | | | | | | | * commit '12aebdfa5': Close the database connection we create during startup (#8131)
| * Close the database connection we create during startup (#8131)Richard van der Hoff2020-08-191-1/+10
| | | | | | ... otherwise it gets leaked.
* | Merge commit 'c9c544cda' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-195-98/+121
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit 'c9c544cda': Remove `ChainedIdGenerator`. (#8123) Switch the JSON byte producer from a pull to a push producer. (#8116) Updated docs: Added note about missing 308 redirect support. (#8120) Be stricter about JSON that is accepted by Synapse (#8106) Convert runWithConnection to async. (#8121) Remove the unused inlineCallbacks code-paths in the caching code (#8119) Separate `get_current_token` into two. (#8113) Convert events worker database to async/await. (#8071) Add a link to the matrix-synapse-rest-password-provider. (#8111)
| * Remove `ChainedIdGenerator`. (#8123)Erik Johnston2020-08-191-19/+17
| | | | | | | | | | It's just a thin wrapper around two ID gens to make `get_current_token` and `get_next` return tuples. This can easily be replaced by calling the appropriate methods on the underlying ID gens directly.
| * Be stricter about JSON that is accepted by Synapse (#8106)Patrick Cloke2020-08-191-2/+14
| |
| * Separate `get_current_token` into two. (#8113)Erik Johnston2020-08-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The function is used for two purposes: 1) for subscribers of streams to get a token they can use to get further updates with, and 2) for replication to track position of the writers of the stream. For streams with a single writer the two scenarios produce the same result, however the situation becomes complicated for streams with multiple writers. The current `MultiWriterIdGenerator` does not correctly handle the first case (which is not an issue as its only used for the `caches` stream which nothing subscribes to outside of replication).
| * Convert events worker database to async/await. (#8071)Patrick Cloke2020-08-183-75/+88
| |
* | Merge commit '3c01724b3' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-191-4/+15
|\| | | | | | | | | | | | | | | | | * commit '3c01724b3': Fix the return type of send_nonmember_events. (#8112) Remove : from allowed client_secret chars (#8101) Rename changelog from bugfix to misc. Iteratively encode JSON responses to avoid blocking the reactor. (#8013) Return the previous stream token if a non-member event is a duplicate. (#8093)
| * Fix the return type of send_nonmember_events. (#8112)Patrick Cloke2020-08-181-4/+15
| |
* | Merge commit '050e20e7c' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-194-15/+15
|\| | | | | | | | | * commit '050e20e7c': Convert some of the general database methods to async (#8100)
| * Convert some of the general database methods to async (#8100)Patrick Cloke2020-08-174-15/+15
| |
* | Merge commit 'e04e465b4' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-199-362/+390
|\| | | | | | | | | | | | | | | | | | | * commit 'e04e465b4': Use the default templates when a custom template file cannot be found (#8037) Changelog changes Convert stream database to async/await. (#8074) Add a shadow-banned flag to users. (#8092) Convert pusher databases to async/await. (#8075) Convert receipts and events databases to async/await. (#8076)
| * Convert stream database to async/await. (#8074)Patrick Cloke2020-08-172-188/+201
| |
| * Add a shadow-banned flag to users. (#8092)Patrick Cloke2020-08-142-1/+26
| |
| * Convert pusher databases to async/await. (#8075)Patrick Cloke2020-08-142-91/+84
| |
| * Convert receipts and events databases to async/await. (#8076)Patrick Cloke2020-08-143-82/+79
| |
* | Merge commit 'dc22090a6' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-1914-299/+51
|\| | | | | | | | | | | | | | | * commit 'dc22090a6': Add type hints to synapse.handlers.room (#8090) Remove some unused database functions. (#8085) Convert misc database code to async (#8087) Remove a space at the start of a changelog entry.
| * Remove some unused database functions. (#8085)Patrick Cloke2020-08-146-244/+18
| |
| * Convert misc database code to async (#8087)Patrick Cloke2020-08-149-55/+33
| |
* | Merge commit 'fbe930dad' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-192-240/+98
|\| | | | | | | | | * commit 'fbe930dad': Convert the roommember database to async/await. (#8070)
| * Convert the roommember database to async/await. (#8070)Patrick Cloke2020-08-122-240/+98
| |
* | Merge commit '5ecc8b582' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-191-153/+180
|\| | | | | | | | | * commit '5ecc8b582': Convert devices database to async/await. (#8069)
| * Convert devices database to async/await. (#8069)Patrick Cloke2020-08-121-153/+180
| |
* | Merge commit 'd68e10f30' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-193-86/+96
|\| | | | | | | | | * commit 'd68e10f30': Convert account data, device inbox, and censor events databases to async/await (#8063)
| * Convert account data, device inbox, and censor events databases to ↵Patrick Cloke2020-08-123-86/+96
| | | | | | | | async/await (#8063)
* | Merge commit 'a3a59bab7' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-197-104/+78
|\| | | | | | | | | * commit 'a3a59bab7': Convert appservice, group server, profile and more databases to async (#8066)
| * Convert appservice, group server, profile and more databases to async (#8066)Patrick Cloke2020-08-127-104/+78
| |
* | Merge commit '9d1e4942a' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-191-12/+16
|\| | | | | | | | | | | | | | | | | * commit '9d1e4942a': Fix typing for notifier (#8064) Add comment explaining cast Handle optional dependencies for Oidc and Saml Newsfile Change HomeServer definition to work with typing.
| * Merge pull request #8060 from matrix-org/erikj/type_serverErik Johnston2020-08-111-12/+16
| |\ | | | | | | Change HomeServer definition to work with typing.
| | * Change HomeServer definition to work with typing.Erik Johnston2020-08-111-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Duplicating function signatures between server.py and server.pyi is silly. This commit changes that by changing all `build_*` methods to `get_*` methods and changing the `_make_dependency_method` to work work as a descriptor that caches the produced value. There are some changes in other files that were made to fix the typing in server.py.
* | | Merge commit '04faa0bfa' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-192-64/+59
|\| | | | | | | | | | | | | | * commit '04faa0bfa': Convert tags and metrics databases to async/await (#8062)
| * | Convert tags and metrics databases to async/await (#8062)Patrick Cloke2020-08-112-64/+59
| | |
* | | Merge commit 'a0acdfa9e' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-193-187/+130
|\| | | | | | | | | | | | | | * commit 'a0acdfa9e': Converts event_federation and registration databases to async/await (#8061)
| * | Converts event_federation and registration databases to async/await (#8061)Patrick Cloke2020-08-113-164/+125
| |/
* | Merge commit 'db131b6b2' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-191-4/+12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'db131b6b2': Change the default log config to reduce disk I/O and storage (#8040) Implement login blocking based on SAML attributes (#8052) Add an assertion on prev_events in create_new_client_event (#8041) Typo Lint why mypy why Lint Incorporate review Incorporate review Fix PUT /pushrules to use the right rule IDs Back out the database hack and replace it with a temporary config setting Fix cache name Fix cache invalidation calls Lint Changelog Implement new experimental push rules with a database hack to enable them
| * Implement new experimental push rules (#7997)Brendan Abolivier2020-08-101-4/+12
| |\ | | | | | | With an undocumented configuration setting to enable them for specific users.
| | * Merge branch 'develop' of github.com:matrix-org/synapse into ↵Brendan Abolivier2020-08-061-4/+12
| | | | | | | | | | | | babolivier/new_push_rules
* | | Merge commit '7f837959e' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-199-252/+199
|\| | | | | | | | | | | | | | | | | * commit '7f837959e': Convert directory, e2e_room_keys, end_to_end_keys, monthly_active_users database to async (#8042) Convert additional database stores to async/await (#8045)
| * | Convert directory, e2e_room_keys, end_to_end_keys, monthly_active_users ↵Patrick Cloke2020-08-075-102/+95
| | | | | | | | | | | | database to async (#8042)
| * | Convert additional database stores to async/await (#8045)Patrick Cloke2020-08-074-150/+104
| | |
* | | Merge commit '4dd27e6d1' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-199-45/+38
|\| | | | | | | | | | | | | | * commit '4dd27e6d1': Reduce unnecessary whitespace in JSON. (#7372)
| * | Reduce unnecessary whitespace in JSON. (#7372)David Vo2020-08-079-45/+38
| | |
* | | Merge commit '2ffd6783c' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-194-151/+2
|\| | | | | | | | | | | | | | * commit '2ffd6783c': Revert #7736 (#8039)
| * | Revert #7736 (#8039)Brendan Abolivier2020-08-064-151/+2
| | |
* | | Merge commit 'd4a7829b1' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-191-3/+2
|\| | | | | | | | | | | | | | * commit 'd4a7829b1': Convert synapse.api to async/await (#8031)
| * | Convert synapse.api to async/await (#8031)Patrick Cloke2020-08-061-3/+2
| |/
* | Merge commit '66f24449d' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-192-0/+39
|\| | | | | | | | | * commit '66f24449d': Improve performance of the register endpoint (#8009)
* | Merge commit 'a7bdf98d0' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-168-10/+301
|/ | | | | * commit 'a7bdf98d0': Rename database classes to make some sense (#8033)
* Rename database classes to make some sense (#8033)Erik Johnston2020-08-05275-0/+35780