synapse/synapse
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
..
_scripts Force TLS certificate verification in registration script. (#16530) 2023-10-23 07:38:51 -04:00
api Fix possible AttributeError when account-api is called over unix socket (#16404) 2023-10-09 10:16:07 +01:00
app Make cached account data/tags/admin types immutable (#16325) 2023-09-18 09:55:04 -04:00
appservice Return immutable objects for cachedList decorators (#16350) 2023-09-19 15:26:44 -04:00
config Implement MSC4028: push all encrypted events. (#16361) 2023-09-26 11:52:19 -04:00
crypto Refactor storing of server keys (#16261) 2023-09-12 11:08:04 +01:00
events Add a cache around server ACL checking (#16360) 2023-09-26 11:57:50 -04:00
federation Convert simple_select_list_paginate_txn to return tuples. (#16433) 2023-10-06 11:41:57 -04:00
handlers Mark sync as limited if there is a gap in the timeline (#16485) 2023-10-19 15:04:18 +01:00
http Register media servlets via regex. (#16419) 2023-10-06 07:22:55 -04:00
logging Bump mypy from 1.4.1 to 1.5.1. (#16300) 2023-09-12 07:16:09 -04:00
media Handle content types with parameters. (#16440) 2023-10-11 07:50:34 -04:00
metrics Only use literal strings for process names (#16315) 2023-09-15 09:10:24 +01:00
module_api Convert user_get_threepids response to attrs. (#16468) 2023-10-11 20:08:11 -04:00
push Remove manys calls to cursor_to_dict (#16431) 2023-10-05 11:07:38 -04:00
replication Fix bug where a new writer advances their token too quickly (#16473) 2023-10-23 16:57:30 +01:00
res Use oEmbed for YouTube Shorts (#15025) 2023-05-03 12:54:42 -04:00
rest Convert user_get_threepids response to attrs. (#16468) 2023-10-11 20:08:11 -04:00
server_notices Refactor `get_user_by_id` (#16316) 2023-09-14 12:46:30 +01:00
spam_checker_api Fix import in module_api module and docs on the new check_event_for_spam signature (#12918) 2022-05-31 12:04:53 +02:00
state Improve state types. (#16395) 2023-09-28 07:01:46 -04:00
static Update link to the clients webpage, fix #15825 (#15874) 2023-07-06 17:28:09 +02:00
storage Fix bug where a new writer advances their token too quickly (#16473) 2023-10-23 16:57:30 +01:00
streams Some refactors around receipts stream (#16426) 2023-10-04 16:28:40 +01:00
types Factor out `MultiWriter` token from `RoomStreamToken` (#16427) 2023-10-05 10:46:28 +01:00
util Fix a bug where servers could be marked as up when they were failing (#16506) 2023-10-17 07:32:40 -04:00
__init__.py Gracefully handle failing to thumbnail images (#16211) 2023-08-30 15:18:34 +01:00
_pydantic_compat.py Add support for pydantic v2 via pydantic.v1 compat module (#16332) 2023-09-25 15:19:08 +00:00
event_auth.py Bump ruff from 0.0.277 to 0.0.286 (#16198) 2023-08-29 09:41:43 -04:00
notifier.py Some refactors around receipts stream (#16426) 2023-10-04 16:28:40 +01:00
py.typed Mark Module API error imports as re-exported and mark Synapse as containing type annotations (#11054) 2021-10-13 08:42:41 +01:00
server.py Fix typo where we ended up with multiple `WorkerLocksHandler` (#16220) 2023-09-01 16:03:31 +01:00
visibility.py Use StrCollection in additional places. (#16301) 2023-09-13 07:57:19 -04:00