0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-06-08 13:48:57 +02:00
synapse/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 Reference Matrix Home Server 2014-08-12 15:10:52 +01:00
test__base.py Require types in tests.storage. (#14646) 2022-12-09 12:36:32 -05:00
test_account_data.py Fix a long-standing bug where an initial sync would not respond to changes to the list of ignored users if there was an initial sync cached. (#15163) 2023-02-28 17:11:26 +00:00
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 Require types in tests.storage. (#14646) 2022-12-09 12:36:32 -05:00
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 Make sqlite database migrations transactional again, part two (#14926) 2023-01-31 11:03:55 +00:00
test_devices.py Prepare unit tests for Python 3.12 (#16099) 2023-08-25 15:05:10 -04:00
test_directory.py Require types in tests.storage. (#14646) 2022-12-09 12:36:32 -05:00
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 Remove unused room_alias field from /createRoom response (#15093) 2023-02-22 11:07:28 +00:00
test_event_push_actions.py Bump black from 22.12.0 to 23.1.0 (#15103) 2023-02-22 15:29:09 -05:00
test_events.py Add final type hint to tests.unittest. (#15072) 2023-02-14 14:03:35 -05:00
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 Remove unused room_alias field from /createRoom response (#15093) 2023-02-22 11:07:28 +00:00
test_redaction.py Add a class UnpersistedEventContext to allow for the batching up of storing state groups (#14675) 2023-02-09 13:05:02 -08:00
test_registration.py Refactor get_user_by_id (#16316) 2023-09-14 12:46:30 +01:00
test_relations.py Accept threaded receipts for events related to the root event. (#14174) 2022-10-14 18:05:25 +00:00
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 Bump black from 22.12.0 to 23.1.0 (#15103) 2023-02-22 15:29:09 -05:00
test_state.py Use immutabledict instead of frozendict (#15113) 2023-03-22 17:15:34 +00:00
test_stream.py Add final type hint to tests.unittest. (#15072) 2023-02-14 14:03:35 -05:00
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 Add final type hint to tests.unittest. (#15072) 2023-02-14 14:03:35 -05:00
test_user_directory.py Fix ICU tests on alpine / macOS. (#15177) 2023-03-03 14:22:06 +00:00
test_user_filters.py Update ruff config (#16283) 2023-09-08 11:24:36 -04:00