MatrixSynapse/tests/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
..
databases Update ruff config (#16283) 2023-09-08 11:24:36 -04:00
util Replace make_awaitable with AsyncMock (#16179) 2023-08-24 19:38:46 -04:00
__init__.py
test__base.py
test_account_data.py
test_appservice.py Bump mypy-zope & mypy. (#16188) 2023-08-29 10:38:56 -04:00
test_background_update.py Log the details of background update failures (#16212) 2023-09-01 12:41:56 +01:00
test_base.py
test_cleanup_extrems.py Return an immutable value from get_latest_event_ids_in_room. (#16326) 2023-09-18 09:29:05 -04:00
test_client_ips.py Convert DeviceLastConnectionInfo to attrs. (#16507) 2023-10-17 12:47:42 +00:00
test_database.py
test_devices.py Prepare unit tests for Python 3.12 (#16099) 2023-08-25 15:05:10 -04:00
test_directory.py
test_e2e_room_keys.py Re-introduce the outbound federation proxy (#15913) 2023-07-18 09:49:21 +01:00
test_end_to_end_keys.py Prepare unit tests for Python 3.12 (#16099) 2023-08-25 15:05:10 -04:00
test_event_chain.py Convert simple_select_many_batch, simple_select_many_txn to tuples. (#16444) 2023-10-11 13:24:56 -04:00
test_event_federation.py Update ruff config (#16283) 2023-09-08 11:24:36 -04:00
test_event_metrics.py
test_event_push_actions.py
test_events.py
test_id_generators.py Fix bug where a new writer advances their token too quickly (#16473) 2023-10-23 16:57:30 +01:00
test_main.py Run pyupgrade for python 3.7 & 3.8. (#16110) 2023-08-15 08:11:20 -04:00
test_monthly_active_users.py Bump mypy-zope & mypy. (#16188) 2023-08-29 10:38:56 -04:00
test_profile.py Update ruff config (#16283) 2023-09-08 11:24:36 -04:00
test_purge.py Re-introduce the outbound federation proxy (#15913) 2023-07-18 09:49:21 +01:00
test_receipts.py
test_redaction.py
test_registration.py Refactor `get_user_by_id` (#16316) 2023-09-14 12:46:30 +01:00
test_relations.py
test_rollback_worker.py Re-introduce the outbound federation proxy (#15913) 2023-07-18 09:49:21 +01:00
test_room.py Prepare unit tests for Python 3.12 (#16099) 2023-08-25 15:05:10 -04:00
test_room_search.py Run pyupgrade for python 3.7 & 3.8. (#16110) 2023-08-15 08:11:20 -04:00
test_roommember.py
test_state.py
test_stream.py
test_transactions.py Allow config of the backoff algorithm for the federation client. (#15754) 2023-08-03 14:36:55 -04:00
test_txn_limit.py Update ruff config (#16283) 2023-09-08 11:24:36 -04:00
test_unsafe_locale.py
test_user_directory.py
test_user_filters.py Update ruff config (#16283) 2023-09-08 11:24:36 -04:00