diff options
author | Erik Johnston <erik@matrix.org> | 2016-06-08 13:26:26 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-06-08 13:26:26 +0100 |
commit | 128360d4f0199472879b999b63c2f5129a4b884a (patch) | |
tree | 435e4b9cb2b00cf5936b91ed273c285e8baff302 /synapse/storage/presence.py | |
parent | Merge pull request #850 from matrix-org/erikj/gc_threshold (diff) | |
parent | Don't hit DB for noop replications queries (diff) | |
download | synapse-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/presence.py')
-rw-r--r-- | synapse/storage/presence.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/storage/presence.py b/synapse/storage/presence.py index 3fab57a7e8..d03f7c541e 100644 --- a/synapse/storage/presence.py +++ b/synapse/storage/presence.py @@ -118,6 +118,9 @@ class PresenceStore(SQLBaseStore): ) def get_all_presence_updates(self, last_id, current_id): + if last_id == current_id: + return defer.succeed([]) + def get_all_presence_updates_txn(txn): sql = ( "SELECT stream_id, user_id, state, last_active_ts," |