- Oct 15, 2020
-
-
Neil Johnson authored
Include user agent in user daily visits table.
-
Richard van der Hoff authored
Simplify `_locally_reject_invite`
-
- Oct 14, 2020
-
-
Erik Johnston authored
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.
-
Erik Johnston authored
We asserted that the IDs returned by postgres sequence was greater than any we had seen, however this is technically racey as we may update the current positions out of order. We now assert that the sequences are correct on startup, so the assertion is no longer really required, so we remove them.
-
Christopher May-Townsend authored
Signed-off-by:
Christopher May-Townsend <chris@maytownsend.co.uk>
-
Brendan Abolivier authored
* Update documentation on retention policies limits Document the changes from https://github.com/matrix-org/synapse/pull/8104
-
Erik Johnston authored
These are tests for #8439
-
Erik Johnston authored
* Fix outbound federaion with multiple event persisters. We incorrectly notified federation senders that the minimum persisted stream position had advanced when we got an `RDATA` from an event persister. Notifying of federation senders already correctly happens in the notifier, so we just delete the offending line. * Change some interfaces to use RoomStreamToken. By enforcing use of `RoomStreamTokens` we make it less likely that people pass in random ints that they got from somewhere random.
-
Brendan Abolivier authored
* Make sure a retention policy is a state event * Changelog
-
Aaron Raimist authored
Fixes #8029
-
- Oct 13, 2020
-
-
Richard van der Hoff authored
-
Richard van der Hoff authored
Update `EventCreationHandler.create_event` to accept an auth_events param, and use it in `_locally_reject_invite` instead of reinventing the wheel.
-
Richard van der Hoff authored
this is always the same as requester.access_token_id.
-
Patrick Cloke authored
-
Erik Johnston authored
Should fix #3365.
-
Andrew Morgan authored
* master: 1.21.1 Explicitly install test dependencies when building deb packages (#8523)
-
- Oct 12, 2020
-
-
Christopher May-Townsend authored
Signed-off-by:
Christopher May-Townsend <(chris@maytownsend.co.uk)>
-
Andrew Morgan authored
After https://github.com/matrix-org/synapse/pull/8377, the deb packages no longer indirectly installed the `"test"` dependencies, causing debian packages to fail to build while carrying out the unit tests. This PR installs `test` dependencies explicitly when building debian packages.
-
Andrew Morgan authored
-
Andrew Morgan authored
-
Erik Johnston authored
Currently background proccesses stream the events stream use the "minimum persisted position" (i.e. `get_current_token()`) rather than the vector clock style tokens. This is broadly fine as it doesn't matter if the background processes lag a small amount. However, in extreme cases (i.e. SyTests) where we only write to one event persister the background processes will never make progress. This PR changes it so that the `MultiWriterIDGenerator` keeps the current position of a given instance as up to date as possible (i.e using the latest token it sees if its not in the process of persisting anything), and then periodically announces that over replication. This then allows the "minimum persisted position" to advance, albeit with a small lag.
-
Andrew Morgan authored
-
- Oct 11, 2020
-
-
Samuel Philipp authored
-
- Oct 09, 2020
-
-
Patrick Cloke authored
-
Richard van der Hoff authored
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 ```
-
Mateusz Przybyłowicz authored
Signed-off-by:
Mateusz Przybyłowicz <uamfhq@gmail.com>
-
Patrick Cloke authored
-
Andrew Morgan authored
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.
-
Erik Johnston authored
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.
-
Patrick Cloke authored
-
Patrick Cloke authored
All handlers now available via get_*_handler() methods on the HomeServer.
-
Patrick Cloke authored
-
- Oct 08, 2020
-
-
Hubert Chathi authored
-
Erik Johnston authored
Synapse 1.21.0rc3 (2020-10-08) ============================== Bugfixes -------- - Fix duplication of events on high traffic servers, caused by PostgreSQL `could not serialize access due to concurrent update` errors. ([\#8456](https://github.com/matrix-org/synapse/issues/8456)) Internal Changes ---------------- - Add Groovy Gorilla to the list of distributions we build `.deb`s for. ([\#8475](https://github.com/matrix-org/synapse/issues/8475))
-
Erik Johnston authored
-
Mateusz Przybyłowicz authored
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>
-
Richard van der Hoff authored
This turns: Failed to parse config for 'myplugin': Exception('error message') into: Failed to parse config for 'myplugin': error message.
-