diff options
author | Erik Johnston <erik@matrix.org> | 2017-05-18 11:45:56 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-05-18 11:45:56 +0100 |
commit | 056ba9b7953ae3709176d424b3b2fec4625bc480 (patch) | |
tree | 52a5a825d42289563d35fb740304d4dbdd843ca6 /synapse | |
parent | Faster push rule calculation via push specific cache (diff) | |
download | synapse-056ba9b7953ae3709176d424b3b2fec4625bc480.tar.xz |
Add comment
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/push/bulk_push_rule_evaluator.py | 3 |
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 |