summary refs log tree commit diff
path: root/synapse/push
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-05-18 11:45:56 +0100
committerErik Johnston <erik@matrix.org>2017-05-18 11:45:56 +0100
commit056ba9b7953ae3709176d424b3b2fec4625bc480 (patch)
tree52a5a825d42289563d35fb740304d4dbdd843ca6 /synapse/push
parentFaster push rule calculation via push specific cache (diff)
downloadsynapse-056ba9b7953ae3709176d424b3b2fec4625bc480.tar.xz
Add comment
Diffstat (limited to 'synapse/push')
-rw-r--r--synapse/push/bulk_push_rule_evaluator.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/push/bulk_push_rule_evaluator.py b/synapse/push/bulk_push_rule_evaluator.py
index 43c2e27dcd..5b1f9a1c2d 100644
--- a/synapse/push/bulk_push_rule_evaluator.py
+++ b/synapse/push/bulk_push_rule_evaluator.py
@@ -74,6 +74,9 @@ class BulkPushRuleEvaluator:
         Returns:
             RulesForRoom
         """
+        # It's important that RulesForRoom gets added to self._get_rules_for_room.cache
+        # before any lookup methods get called on it as otherwise there may be
+        # a race if invalidate_all gets called (which assumes its in the cache)
         return RulesForRoom(self.hs, room_id, self._get_rules_for_room.cache)
 
     @defer.inlineCallbacks