forked-synapse/synapse/replication/tcp
Erik Johnston 8f35f8148e
Fix bug where a new writer advances their token too quickly (#16473)
* Fix bug where a new writer advances their token too quickly

When starting a new writer (for e.g. persisting events), the
`MultiWriterIdGenerator` doesn't have a minimum token for it as there
are no rows matching that new writer in the DB.

This results in the the first stream ID it acquired being announced as
persisted *before* it actually finishes persisting, if another writer
gets and persists a subsequent stream ID. This is due to the logic of
setting the minimum persisted position to the minimum known position of
across all writers, and the new writer starts off not being considered.

* Fix sending out POSITIONs when our token advances without update

Broke in #14820

* For replication HTTP requests, only wait for minimal position
2023-10-23 16:57:30 +01:00
..
streams Fix bug where a new writer advances their token too quickly (#16473) 2023-10-23 16:57:30 +01:00
__init__.py Update replication.md with info on TCP module structure (#12621) 2022-05-09 14:46:43 -07:00
client.py Some refactors around receipts stream (#16426) 2023-10-04 16:28:40 +01:00
commands.py Fix comments related to replication. (#16428) 2023-10-06 07:25:44 -04:00
context.py Add redis SSL configuration options (#15312) 2023-05-11 13:02:51 +01:00
external_cache.py Add opentracing spans to calls to external cache (#12380) 2022-04-07 13:18:29 +01:00
handler.py Some minor performance fixes for task schedular (#16313) 2023-09-14 16:20:47 +01:00
protocol.py Add some clarification to the doc/comments regarding TCP replication (#15354) 2023-03-30 12:51:35 +02:00
redis.py Add Unix socket support for Redis connections (#15644) 2023-05-26 15:28:39 -04:00
resource.py Improve logging of replication (#16309) 2023-09-13 09:51:50 +00:00