summary refs log tree commit diff
path: root/synapse/storage/push_rule.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-06-08 13:26:26 +0100
committerErik Johnston <erik@matrix.org>2016-06-08 13:26:26 +0100
commit128360d4f0199472879b999b63c2f5129a4b884a (patch)
tree435e4b9cb2b00cf5936b91ed273c285e8baff302 /synapse/storage/push_rule.py
parentMerge pull request #850 from matrix-org/erikj/gc_threshold (diff)
parentDon't hit DB for noop replications queries (diff)
downloadsynapse-128360d4f0199472879b999b63c2f5129a4b884a.tar.xz
Merge pull request #853 from matrix-org/erikj/replication_noop
Don't hit DB for noop replications queries
Diffstat (limited to 'synapse/storage/push_rule.py')
-rw-r--r--synapse/storage/push_rule.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/storage/push_rule.py b/synapse/storage/push_rule.py
index 786d6f6d67..8183b7f1b0 100644
--- a/synapse/storage/push_rule.py
+++ b/synapse/storage/push_rule.py
@@ -421,6 +421,9 @@ class PushRuleStore(SQLBaseStore):
 
     def get_all_push_rule_updates(self, last_id, current_id, limit):
         """Get all the push rules changes that have happend on the server"""
+        if last_id == current_id:
+            return defer.succeed([])
+
         def get_all_push_rule_updates_txn(txn):
             sql = (
                 "SELECT stream_id, event_stream_ordering, user_id, rule_id,"