diff options
author | Erik Johnston <erik@matrix.org> | 2016-06-08 11:33:30 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-06-08 11:33:30 +0100 |
commit | 1a815fb04f1d17286be27379dd7463936606bd3a (patch) | |
tree | 435e4b9cb2b00cf5936b91ed273c285e8baff302 /synapse/storage/account_data.py | |
parent | Merge pull request #850 from matrix-org/erikj/gc_threshold (diff) | |
download | synapse-1a815fb04f1d17286be27379dd7463936606bd3a.tar.xz |
Don't hit DB for noop replications queries
Diffstat (limited to 'synapse/storage/account_data.py')
-rw-r--r-- | synapse/storage/account_data.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/storage/account_data.py b/synapse/storage/account_data.py index ec7e8d40d2..3fa226e92d 100644 --- a/synapse/storage/account_data.py +++ b/synapse/storage/account_data.py @@ -138,6 +138,9 @@ class AccountDataStore(SQLBaseStore): A deferred pair of lists of tuples of stream_id int, user_id string, room_id string, type string, and content string. """ + if last_room_id == current_id and last_global_id == current_id: + return defer.succeed(([], [])) + def get_updated_account_data_txn(txn): sql = ( "SELECT stream_id, user_id, account_data_type, content" |