summary refs log tree commit diff
path: root/synapse/replication/http/streams.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Correctly mention previous copyright (#16820)Erik Johnston2024-01-231-0/+1
| | | | | During the migration the automated script to update the copyright headers accidentally got rid of some of the existing copyright lines. Reinstate them.
* Update license headersPatrick Cloke2023-11-211-10/+16
|
* Wait for streams to catch up when processing HTTP replication. (#14820)Erik Johnston2023-01-181-1/+5
| | | | This should hopefully mitigate a class of races where data gets out of sync due a HTTP replication request racing with the replication streams.
* Add missing type hints to synapse.replication.http. (#11856)Patrick Cloke2022-02-081-4/+12
|
* Add type hints for most `HomeServer` parameters (#11095)Sean Quah2021-10-221-2/+6
|
* 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>`
* Convert replication code to async/await. (#7987)Patrick Cloke2020-08-031-1/+1
|
* Add ability to wait for replication streams (#7542)Erik Johnston2020-05-221-4/+1
| | | | | | | The idea here is that if an instance persists an event via the replication HTTP API it can return before we receive that event over replication, which can lead to races where code assumes that persisting an event immediately updates various caches (e.g. current state of the room). Most of Synapse doesn't hit such races, so we don't do the waiting automagically, instead we do so where necessary to avoid unnecessary delays. We may decide to change our minds here if it turns out there are a lot of subtle races going on. People probably want to look at this commit by commit.
* Have all instances correctly respond to REPLICATE command. (#7475)Erik Johnston2020-05-131-2/+2
| | | | | Before all streams were only written to from master, so only master needed to respond to `REPLICATE` commands. Before all instances wrote to the cache invalidation stream, but didn't respond to `REPLICATE`. This was a bug, which could lead to missed rows from cache invalidation stream if an instance is restarted, however all the caches would be empty in that case so it wasn't a problem.
* Thread through instance name to replication client. (#7369)Erik Johnston2020-05-011-1/+3
| | | For in memory streams when fetching updates on workers we need to query the source of the stream, which currently is hard coded to be master. This PR threads through the source instance we received via `POSITION` through to the update function in each stream, which can then be passed to the replication client for in memory streams.
* Remove 'limit' param from `get_repl_stream_updates` APIRichard van der Hoff2020-04-231-5/+7
| | | | | there doesn't seem to be much point in passing this limit all around, since both sides agree it's meant to be 100.
* Move catchup of replication streams to worker. (#7024)Erik Johnston2020-03-251-0/+78
This changes the replication protocol so that the server does not send down `RDATA` for rows that happened before the client connected. Instead, the server will send a `POSITION` and clients then query the database (or master out of band) to get up to date.