diff options
author | Erik Johnston <erik@matrix.org> | 2018-06-01 11:51:11 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-06-01 11:51:11 +0100 |
commit | 9e7cf48461ac773cb6661465ab9cf0cf7a190c8d (patch) | |
tree | 5a91a7ce58aeb058e2c426d14871431e8ab3740c /synapse/storage/stream.py | |
parent | Don't drop topo ordering when there is no chunk_id (diff) | |
download | synapse-9e7cf48461ac773cb6661465ab9cf0cf7a190c8d.tar.xz |
Reuse stream_ordering attribute instead of order
The internal metadata "order" attribute was only used in one place, which was equivalent to using the stream ordering anyway.
Diffstat (limited to 'synapse/storage/stream.py')
-rw-r--r-- | synapse/storage/stream.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py index baf3715c28..d46672aa4a 100644 --- a/synapse/storage/stream.py +++ b/synapse/storage/stream.py @@ -543,20 +543,15 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore): stream = row.stream_ordering internal = event.internal_metadata + + internal.stream_ordering = stream + if topo_order: internal.before = str(RoomStreamToken(chunk, topo, stream - 1)) internal.after = str(RoomStreamToken(chunk, topo, stream)) - internal.order = ( - int(chunk) if chunk else 0, - int(topo) if topo else 0, - int(stream), - ) else: internal.before = str(RoomStreamToken(None, None, stream - 1)) internal.after = str(RoomStreamToken(None, None, stream)) - internal.order = ( - 0, 0, int(stream), - ) @defer.inlineCallbacks def get_events_around(self, room_id, event_id, before_limit, after_limit): |