summary refs log tree commit diff
path: root/synapse/storage/room.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2016-10-11 15:41:55 +0100
committerGitHub <noreply@github.com>2016-10-11 15:41:55 +0100
commite641115421b44c567bc0f1ca8d39a83e32891383 (patch)
tree51a8cb5ed3f294887bdcc2d6ef36efcad186af07 /synapse/storage/room.py
parentMerge pull request #1166 from matrix-org/rav/grandfather_broken_riot_signup (diff)
parentMerge branch 'develop' of github.com:matrix-org/synapse into erikj/replicatio... (diff)
downloadsynapse-e641115421b44c567bc0f1ca8d39a83e32891383.tar.xz
Merge pull request #1141 from matrix-org/erikj/replication_noop
Reduce DB hits for replication
Diffstat (limited to 'synapse/storage/room.py')
-rw-r--r--synapse/storage/room.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/storage/room.py b/synapse/storage/room.py
index 2ef13d7403..11813b44f6 100644
--- a/synapse/storage/room.py
+++ b/synapse/storage/room.py
@@ -320,6 +320,9 @@ class RoomStore(SQLBaseStore):
             txn.execute(sql, (prev_id, current_id, limit,))
             return txn.fetchall()
 
+        if prev_id == current_id:
+            return defer.succeed([])
+
         return self.runInteraction(
             "get_all_new_public_rooms", get_all_new_public_rooms
         )