summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-03-09 15:45:34 +0000
committerErik Johnston <erik@matrix.org>2016-03-09 15:45:34 +0000
commit3ecaabc7fd8a1a461c319248a94617cf24dd4070 (patch)
treef5a2cbc0cf65ce2d3292960c3239cc5c6eb13343
parentMerge pull request #634 from matrix-org/erikj/pin_saml2_version (diff)
downloadsynapse-3ecaabc7fd8a1a461c319248a94617cf24dd4070.tar.xz
Use topological orders for initial sync timeline
Diffstat (limited to '')
-rw-r--r--synapse/storage/stream.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py
index 8908d5b5da..613b54cd1d 100644
--- a/synapse/storage/stream.py
+++ b/synapse/storage/stream.py
@@ -217,8 +217,8 @@ class StreamStore(SQLBaseStore):
                     " room_id = ?"
                     " AND not outlier"
                     " AND stream_ordering <= ?"
-                    " ORDER BY stream_ordering %s LIMIT ?"
-                ) % (order,)
+                    " ORDER BY topological_ordering %s, stream_ordering %s LIMIT ?"
+                ) % (order, order,)
                 txn.execute(sql, (room_id, to_id, limit))
 
             rows = self.cursor_to_dict(txn)