0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-06-17 10:08:28 +02:00
synapse/tests
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
..
api Refactor get_user_by_id (#16316) 2023-09-14 12:46:30 +01:00
app Run pyupgrade for python 3.7 & 3.8. (#16110) 2023-08-15 08:11:20 -04:00
appservice Send the opentracing span information to appservices (#16227) 2023-09-06 15:19:17 -04:00
config Describe which rate limiter was hit in logs (#16135) 2023-08-30 00:39:39 +01:00
crypto Refactor storing of server keys (#16261) 2023-09-12 11:08:04 +01:00
events Replace simple_async_mock with AsyncMock (#16180) 2023-08-25 09:27:21 -04:00
federation Stop sending incorrect knock_state_events. (#16403) 2023-10-06 07:27:35 -04:00
handlers Convert state delta processing from a dict to attrs. (#16469) 2023-10-16 07:35:22 -04:00
http Add MSC4040 matrix-fed service lookups (#16137) 2023-09-05 15:45:39 -04:00
logging Update ruff config (#16283) 2023-09-08 11:24:36 -04:00
media Handle content types with parameters. (#16440) 2023-10-11 07:50:34 -04:00
metrics Remove support for Python 3.7 (#15851) 2023-07-05 18:45:42 -05:00
module_api Convert user_get_threepids response to attrs. (#16468) 2023-10-11 20:08:11 -04:00
push Add the List-Unsubscribe header for notification emails. (#16274) 2023-09-11 09:49:48 -04:00
replication Avoid sending massive replication updates when purging a room. (#16510) 2023-10-18 12:26:01 -04:00
rest Apply join rate limiter outside the lineariser (#16441) 2023-10-06 17:31:52 +00:00
scripts Add more missing type hints to tests. (#15028) 2023-02-08 16:29:49 -05:00
server_notices Bump mypy-zope & mypy. (#16188) 2023-08-29 10:38:56 -04:00
state Improve state types. (#16395) 2023-09-28 07:01:46 -04:00
storage Fix bug where a new writer advances their token too quickly (#16473) 2023-10-23 16:57:30 +01:00
test_utils Replace simple_async_mock with AsyncMock (#16180) 2023-08-25 09:27:21 -04:00
types Use immutabledict instead of frozendict (#15113) 2023-03-22 17:15:34 +00: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 Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
server.py Bump mypy-zope & mypy. (#16188) 2023-08-29 10:38:56 -04:00
test_distributor.py Add missing type hints to tests. (#15027) 2023-02-08 19:52:37 +00:00
test_event_auth.py Add missing type hints to tests. (#15027) 2023-02-08 19:52:37 +00:00
test_federation.py Return an immutable value from get_latest_event_ids_in_room. (#16326) 2023-09-18 09:29:05 -04:00
test_mau.py Bump black from 22.12.0 to 23.1.0 (#15103) 2023-02-22 15:29:09 -05:00
test_phone_home.py Add final type hint to tests.unittest. (#15072) 2023-02-14 14:03:35 -05:00
test_rust.py Add missing type hints to tests. (#15027) 2023-02-08 19:52:37 +00:00
test_server.py Re-introduce the outbound federation proxy (#15913) 2023-07-18 09:49:21 +01:00
test_state.py Bump mypy-zope & mypy. (#16188) 2023-08-29 10:38:56 -04:00
test_terms_auth.py Prepare unit tests for Python 3.12 (#16099) 2023-08-25 15:05:10 -04:00
test_test_utils.py Add missing type hints to tests. (#15027) 2023-02-08 19:52:37 +00:00
test_types.py Add missing type hints to tests. (#15027) 2023-02-08 19:52:37 +00:00
test_visibility.py Update ruff config (#16283) 2023-09-08 11:24:36 -04:00
unittest.py Register media servlets via regex. (#16419) 2023-10-06 07:22:55 -04:00
utils.py Modify StoreKeyFetcher to read from server_keys_json. (#15417) 2023-04-20 12:30:32 -04:00