Skip to content
Snippets Groups Projects
Commit 1731af3f authored by Mark Haines's avatar Mark Haines
Browse files

SYN-104: When going backwards the end token should be before the last event

parent 11fd81e3
No related branches found
No related tags found
No related merge requests found
...@@ -253,6 +253,9 @@ class StreamStore(SQLBaseStore): ...@@ -253,6 +253,9 @@ class StreamStore(SQLBaseStore):
if rows: if rows:
topo = rows[-1]["topological_ordering"] topo = rows[-1]["topological_ordering"]
toke = rows[-1]["stream_ordering"] toke = rows[-1]["stream_ordering"]
if direction == 'b':
topo -= 1
toke -= 1
next_token = "t%s-%s" % (topo, toke) next_token = "t%s-%s" % (topo, toke)
else: else:
# TODO (erikj): We should work out what to do here instead. # TODO (erikj): We should work out what to do here instead.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment