forked-synapse/synapse/replication/http
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
..
__init__.py Persist CreateRoom events to DB in a batch (#13800) 2022-09-28 10:11:48 +00:00
_base.py Fix bug where a new writer advances their token too quickly (#16473) 2023-10-23 16:57:30 +01:00
account_data.py Bump black from 22.12.0 to 23.1.0 (#15103) 2023-02-22 15:29:09 -05:00
devices.py Recheck if remote device is cached before requesting it (#16252) 2023-09-07 12:45:43 +00:00
federation.py Clean up logging on event persister endpoints (#16488) 2023-10-14 17:57:27 +01:00
login.py Wait for streams to catch up when processing HTTP replication. (#14820) 2023-01-18 19:35:29 +00:00
membership.py Add support for knocking to workers. (#15133) 2023-03-02 12:59:53 -05:00
presence.py Pass the device ID around in the presence handler (#16171) 2023-08-28 13:08:49 -04:00
push.py Wait for streams to catch up when processing HTTP replication. (#14820) 2023-01-18 19:35:29 +00:00
register.py Wait for streams to catch up when processing HTTP replication. (#14820) 2023-01-18 19:35:29 +00:00
send_event.py Wait for streams to catch up when processing HTTP replication. (#14820) 2023-01-18 19:35:29 +00:00
send_events.py Clean up logging on event persister endpoints (#16488) 2023-10-14 17:57:27 +01:00
state.py Wait for streams to catch up when processing HTTP replication. (#14820) 2023-01-18 19:35:29 +00:00
streams.py Wait for streams to catch up when processing HTTP replication. (#14820) 2023-01-18 19:35:29 +00:00