0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-12-15 00:13:43 +01:00
dendrite/syncapi/storage/sqlite3
Kegsay 5e9dce1c0c
syncapi: Rename and split out tokens (#1025)
* syncapi: Rename and split out tokens

Previously we used the badly named `PaginationToken` which was
used for both `/sync` and `/messages` requests. This quickly
became confusing because named fields like `PDUPosition` meant
different things depending on the token type. Instead, we now have
two token types: `TopologyToken` and `StreamingToken`, both of
which have fields which make more sense for their specific situations.

Updated the codebase to use one or the other. `PaginationToken` still
lives on as `syncToken`, an unexported type which both tokens rely on.
This allows us to guarantee that the specific mappings of positions
to a string remain solely under the control of the `types` package.
This enables us to move high-level conceptual things like
"decrement this topological token" to function calls e.g
`TopologicalToken.Decrement()`.

Currently broken because `/messages` seemingly used both stream and
topological tokens, though I need to confirm this.

* final tweaks/hacks

* spurious logging

* Review comments and linting
2020-05-13 12:14:50 +01:00
..
account_data_table.go Log errors from rows.Close (#920) 2020-03-18 10:17:18 +00:00
current_room_state_table.go HeaderedEvents in sync API (#922) 2020-03-19 12:07:01 +00:00
invites_table.go HeaderedEvents in sync API (#922) 2020-03-19 12:07:01 +00:00
output_room_events_table.go Fix prev_batch tokens (#999) 2020-05-01 12:41:38 +01:00
output_room_events_topology_table.go Fix prev_batch tokens (#999) 2020-05-01 12:41:38 +01:00
stream_id_table.go Support sqlite in addition to postgres (#869) 2020-02-13 17:27:33 +00:00
syncserver.go syncapi: Rename and split out tokens (#1025) 2020-05-13 12:14:50 +01:00