@@ -1185,8 +1185,9 @@ async def clear_partial_state_room(self, room_id: str) -> bool:
1185
1185
)
1186
1186
return False
1187
1187
1188
- @staticmethod
1189
- def _clear_partial_state_room_txn (txn : LoggingTransaction , room_id : str ) -> None :
1188
+ def _clear_partial_state_room_txn (
1189
+ self , txn : LoggingTransaction , room_id : str
1190
+ ) -> None :
1190
1191
DatabasePool .simple_delete_txn (
1191
1192
txn ,
1192
1193
table = "partial_state_rooms_servers" ,
@@ -1197,7 +1198,9 @@ def _clear_partial_state_room_txn(txn: LoggingTransaction, room_id: str) -> None
1197
1198
table = "partial_state_rooms" ,
1198
1199
keyvalues = {"room_id" : room_id },
1199
1200
)
1201
+ self ._invalidate_cache_and_stream (txn , self .is_partial_state_room , (room_id ,))
1200
1202
1203
+ @cached ()
1201
1204
async def is_partial_state_room (self , room_id : str ) -> bool :
1202
1205
"""Checks if this room has partial state.
1203
1206
@@ -1771,9 +1774,8 @@ async def store_partial_state_room(
1771
1774
servers ,
1772
1775
)
1773
1776
1774
- @staticmethod
1775
1777
def _store_partial_state_room_txn (
1776
- txn : LoggingTransaction , room_id : str , servers : Collection [str ]
1778
+ self , txn : LoggingTransaction , room_id : str , servers : Collection [str ]
1777
1779
) -> None :
1778
1780
DatabasePool .simple_insert_txn (
1779
1781
txn ,
@@ -1788,6 +1790,7 @@ def _store_partial_state_room_txn(
1788
1790
keys = ("room_id" , "server_name" ),
1789
1791
values = ((room_id , s ) for s in servers ),
1790
1792
)
1793
+ self ._invalidate_cache_and_stream (txn , self .is_partial_state_room , (room_id ,))
1791
1794
1792
1795
async def maybe_store_room_on_outlier_membership (
1793
1796
self , room_id : str , room_version : RoomVersion
0 commit comments