mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-23 10:05:55 +03:00
Trace current_state_events
This commit is contained in:
parent
65c0fd5a61
commit
664065a44e
2 changed files with 13 additions and 0 deletions
|
@ -1155,6 +1155,8 @@ class PersistEventsStore:
|
|||
to_delete = delta_state.to_delete
|
||||
to_insert = delta_state.to_insert
|
||||
|
||||
logger.info("asdf _update_current_state_txn: %s %s", to_delete, to_insert)
|
||||
|
||||
# Figure out the changes of membership to invalidate the
|
||||
# `get_rooms_for_user` cache.
|
||||
# We find out which membership events we may have deleted
|
||||
|
|
|
@ -681,6 +681,17 @@ class PartialJoinTestCase(unittest.FederatingHomeserverTestCase):
|
|||
f" failed do_invite_join!",
|
||||
)
|
||||
|
||||
# Sanity check that we're not leaving behind any current state events.
|
||||
current_state_check_rows = self.get_success(
|
||||
store.db_pool.simple_select_list(
|
||||
table="current_state_events",
|
||||
keyvalues={"room_id": room_id},
|
||||
retcols=("event_id",),
|
||||
desc="check current_state_events in test",
|
||||
)
|
||||
)
|
||||
self.assertEqual(len(current_state_check_rows), 0)
|
||||
|
||||
def test_duplicate_partial_state_room_syncs(self) -> None:
|
||||
"""
|
||||
Tests that concurrent partial state syncs are not started for the same room.
|
||||
|
|
Loading…
Reference in a new issue