summary refs log tree commit diff
path: root/synapse/replication/tcp (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-10-09Clean-up some broken/unused code in the test framework (#8514)Patrick Cloke3-70/+55
2020-10-09Fix threadsafety in ThreadedMemoryReactorClock (#8497)Richard van der Hoff2-4/+33
This could, very occasionally, cause: ``` tests.test_visibility.FilterEventsForServerTestCase.test_large_room =============================================================================== [ERROR] Traceback (most recent call last): File "/src/tests/rest/media/v1/test_media_storage.py", line 86, in test_ensure_media_is_in_local_cache self.wait_on_thread(x) File "/src/tests/unittest.py", line 296, in wait_on_thread self.reactor.advance(0.01) File "/src/.tox/py35/lib/python3.5/site-packages/twisted/internet/task.py", line 826, in advance self._sortCalls() File "/src/.tox/py35/lib/python3.5/site-packages/twisted/internet/task.py", line 787, in _sortCalls self.calls.sort(key=lambda a: a.getTime()) builtins.ValueError: list modified during sort tests.rest.media.v1.test_media_storage.MediaStorageTests.test_ensure_media_is_in_local_cache ```
2020-10-09Increase default max_upload_size from 10M to 50M (#8502)Mateusz Przybyłowicz5-5/+6
Signed-off-by: Mateusz Przybyłowicz <uamfhq@gmail.com>
2020-10-09Add type hints to response cache. (#8507)Patrick Cloke9-34/+48
2020-10-09Allow modules to create and send events into rooms (#8479)Andrew Morgan5-8/+157
This PR allows Synapse modules making use of the `ModuleApi` to create and send non-membership events into a room. This can useful to have modules send messages, or change power levels in a room etc. Note that they must send event through a user that's already in the room. The non-membership event limitation is currently arbitrary, as it's another chunk of work and not necessary at the moment.
2020-10-09Only send RDATA for instance local events. (#8496)Erik Johnston6-25/+54
When pulling events out of the DB to send over replication we were not filtering by instance name, and so we were sending events for other instances.
2020-10-09Move additional tasks to the background worker, part 3 (#8489)Patrick Cloke8-282/+276
2020-10-09Remove the deprecated Handlers object (#8494)Patrick Cloke40-157/+116
All handlers now available via get_*_handler() methods on the HomeServer.
2020-10-09Add type hints to some handlers (#8505)Patrick Cloke10-22/+60
2020-10-08Invalidate the cache when an olm fallback key is uploaded (#8501)Hubert Chathi3-0/+25
2020-10-08Update change log v1.21.0rc3Erik Johnston1-1/+1
2020-10-081.21.0rc3Erik Johnston4-3/+16
2020-10-08Add useful shields to readme (#8493)Mateusz Przybyłowicz2-7/+24
Added shields directing to synapse-dev room, showing license, latest version on PyPi and supported Python versions. I've moved substitution definitions to the bottom to improve readability. Signed-off-by: Mateusz Przybyłowicz <uamfhq@gmail.com>
2020-10-08Clarify error message when plugin config parsers raise an error (#8492)Richard van der Hoff2-1/+2
This turns: Failed to parse config for 'myplugin': Exception('error message') into: Failed to parse config for 'myplugin': error message.
2020-10-07Reduce serialization errors in MultiWriterIdGen (#8456)Erik Johnston7-5/+109
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.
2020-10-07Move additional tasks to the background worker (#8458)Patrick Cloke8-197/+195
2020-10-07Include the configured log level in phone home stats. (#8477)Patrick Cloke2-0/+8
By reporting the log level of the synapse logger as a string.
2020-10-07Reduce serialization errors in MultiWriterIdGen (#8456)Erik Johnston7-8/+112
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.
2020-10-07Use vector clocks for room stream tokens. (#8439)Erik Johnston4-42/+380
Currently when using multiple event persisters we (in the worst case) don't tell clients about events until all event persisters have persisted new events after the original event. This is a suboptimal, especially if one of the event persisters goes down. To handle this, we encode the position of each event persister in the room tokens so that we can send events to clients immediately. To reduce the size of the token we do two things: 1. We create a unique immutable persistent mapping between instance names and a generated small integer ID, which we can encode in the tokens instead of the instance name; and 2. We encode the "persisted upto position" of the room token and then only explicitly include instances that have positions strictly greater than that. The new tokens look something like: `m3478~1.3488~2.3489`, where the first number is the min position, and the subsequent `-` separated pairs are the instance ID to positions map. (We use `.` and `~` as separators as they're URL safe and not already used by `StreamToken`).
2020-10-07Add typing information to the device handler. (#8407)Patrick Cloke4-38/+59
2020-10-07Fix returning incorrect prev_batch token in incremental sync (#8486)Erik Johnston2-1/+7
2020-10-07Add Ubuntu 20.10 (Groovy Gorilla) to build scripts. (#8475)Patrick Cloke2-0/+2
2020-10-07unblacklist some tests (#8474)Richard van der Hoff3-34/+1
It seems most of these blacklisted tests do actually pass most of the time. I'm of the opinion that having them blacklisted here means there is very little incentive for us to deflake any flaky tests, and meanwhile any value in those tests is completely lost.
2020-10-07Add support for MSC2697: Dehydrated devices (#8380)Hubert Chathi9-21/+454
This allows a user to store an offline device on the server and then restore it at a subsequent login.
2020-10-07Combine `SpamCheckerApi` with the more generic `ModuleApi`. (#8464)Richard van der Hoff10-58/+51
Lots of different module apis is not easy to maintain. Rather than adding yet another ModuleApi(hs, hs.get_auth_handler()) incantation, first add an hs.get_module_api() method and use it where possible.
2020-10-07Remove docs/sphinx and related references (#8480)Andrew Morgan62-839/+1
https://github.com/matrix-org/synapse/tree/develop/docs/sphinx doesn't seem to really be utilised or changed recently since the initial commit. I like the idea of exportable documentation of the codebase, but at the moment after running through the build instructions the generated website wasn't very useful...
2020-10-07update wordingRichard van der Hoff1-2/+3
2020-10-06Add support for MSC2732: olm fallback keys (#8312)Hubert Chathi8-1/+215
2020-10-06Additional tests for third-party event rules (#8468)Richard van der Hoff3-18/+79
* Optimise and test state fetching for 3p event rules Getting all the events at once is much more efficient than getting them individually * Test that 3p event rules can modify events
2020-10-06Don't bother responding to client requests that have already disconnected ↵Andrew Morgan3-0/+12
(#8465) This PR ports the quick fix from https://github.com/matrix-org/synapse/pull/2796 to further methods which handle media, URL preview and `/key/v2/server` requests. This prevents a harmless `ERROR` that comes up in the logs when we were unable to respond to a client request when the client had already disconnected. In this case we simply bail out if the client has already done so. This is the 'simple fix' as suggested by https://github.com/matrix-org/synapse/issues/5304#issuecomment-574740003. Fixes https://github.com/matrix-org/synapse/issues/6700 Fixes https://github.com/matrix-org/synapse/issues/5304
2020-10-05Update default room version to 6 (#8461)Richard van der Hoff4-3/+13
Per https://github.com/matrix-org/matrix-doc/pull/2788
2020-10-05