MatrixSynapse/synapse/storage
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
..
controllers Convert state delta processing from a dict to attrs. (#16469) 2023-10-16 07:35:22 -04:00
databases Fix bug that could cause a `/sync` to tightloop with sqlite after restart (#16540) 2023-10-23 13:39:25 +00:00
engines
schema Remove the last reference to event_txn_id. (#16521) 2023-10-23 07:37:45 -04:00
util Fix bug where a new writer advances their token too quickly (#16473) 2023-10-23 16:57:30 +01:00
__init__.py
_base.py
background_updates.py Add support for pydantic v2 via pydantic.v1 compat module (#16332) 2023-09-25 15:19:08 +00:00
database.py Convert simple_select_many_batch, simple_select_many_txn to tuples. (#16444) 2023-10-11 13:24:56 -04:00
keys.py
prepare_database.py
push_rule.py
roommember.py mypy plugin to check `@cached` return types (#14911) 2023-10-02 14:22:36 +00:00
types.py Bump types-psycopg2 from 2.9.21.11 to 2.9.21.14 (#16381) 2023-09-25 17:48:42 +01:00