anonymousland-synapse/tests/handlers
Andrew Morgan 5d92a1428c
Prevent join->join membership transitions changing member count (#7977)
`StatsHandler` handles updates to the `current_state_delta_stream`, and updates room stats such as the amount of state events, joined users, etc.

However, it counts every new join membership as a new user entering a room (and that user being in another room), whereas it's possible for a user's membership status to go from join -> join, for instance when they change their per-room profile information.

This PR adds a check for join->join membership transitions, and bails out early, as none of the further checks are necessary at that point.

Due to this bug, membership stats in many rooms have ended up being wildly larger than their true values. I am not sure if we also want to include a migration step which recalculates these statistics (possibly using the `_populate_stats_process_rooms` bg update).

Bug introduced in the initial implementation https://github.com/matrix-org/synapse/pull/4338.
2020-08-03 21:54:24 +01:00
..
__init__.py Reference Matrix Home Server 2014-08-12 15:10:52 +01:00
test_admin.py Fixup from review comments. 2019-07-04 11:41:06 +01:00
test_appservice.py Convert appservice to async. (#7973) 2020-07-30 07:27:39 -04:00
test_auth.py Stop Auth methods from polling the config on every req. (#7420) 2020-05-06 15:54:58 +01:00
test_device.py Convert device handler to async/await (#7871) 2020-07-17 07:09:25 -04:00
test_directory.py Convert federation client to async/await. (#7975) 2020-07-30 08:01:33 -04:00
test_e2e_keys.py Convert device handler to async/await (#7871) 2020-07-17 07:09:25 -04:00
test_e2e_room_keys.py Convert E2E key and room key handlers to async/await. (#7851) 2020-07-15 08:48:58 -04:00
test_federation.py Implement room version 6 (MSC2240). (#7506) 2020-05-15 09:30:10 -04:00
test_oidc.py Support UI Authentication for OpenID Connect accounts (#7457) 2020-05-15 12:26:02 -04:00
test_presence.py Port PresenceHandler to async/await (#6991) 2020-02-26 15:33:26 +00:00
test_profile.py Convert federation client to async/await. (#7975) 2020-07-30 08:01:33 -04:00
test_register.py Additional configuration options for auto-join rooms (#7763) 2020-06-30 15:41:36 -04:00
test_stats.py Prevent join->join membership transitions changing member count (#7977) 2020-08-03 21:54:24 +01:00
test_sync.py Stop Auth methods from polling the config on every req. (#7420) 2020-05-06 15:54:58 +01:00
test_typing.py Fix tests 2020-07-15 15:47:27 +01:00
test_user_directory.py Add option to enable encryption by default for new rooms (#7639) 2020-06-10 17:44:34 +01:00