Use topological orders for initial sync timeline

pull/635/head
Erik Johnston 2016-03-09 15:45:34 +00:00
parent 1309b8ca97
commit 3ecaabc7fd
1 changed files with 2 additions and 2 deletions

View File

@ -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)