summary refs log tree commit diff
path: root/synapse/storage/roommember.py
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2015-05-05 17:46:13 +0100
committerMark Haines <mjark@negativecurvature.net>2015-05-05 17:46:13 +0100
commit31049c4d729d3244f208b874e12a1edb055bbf63 (patch)
tree3b5ce83a989809a0b29d393fa04522517c0ed947 /synapse/storage/roommember.py
parentFix the --help option for synapse (diff)
parentAdd some doc-string (diff)
downloadsynapse-31049c4d729d3244f208b874e12a1edb055bbf63.tar.xz
Merge pull request #139 from matrix-org/bugs/SYN-369
Fix race with cache invalidation. SYN-369
Diffstat (limited to 'synapse/storage/roommember.py')
-rw-r--r--synapse/storage/roommember.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py
index 09fb77a194..839c74f63a 100644
--- a/synapse/storage/roommember.py
+++ b/synapse/storage/roommember.py
@@ -64,8 +64,8 @@ class RoomMemberStore(SQLBaseStore):
             }
         )
 
-        self.get_rooms_for_user.invalidate(target_user_id)
-        self.get_joined_hosts_for_room.invalidate(event.room_id)
+        txn.call_after(self.get_rooms_for_user.invalidate, target_user_id)
+        txn.call_after(self.get_joined_hosts_for_room.invalidate, event.room_id)
 
     def get_room_member(self, user_id, room_id):
         """Retrieve the current state of a room member.