synapse-product/synapse
Erik Johnston 5d3e306d9f
Clean up Notifier.on_new_room_event code path (#8288)
The idea here is that we pass the `max_stream_id` to everything, and only use the stream ID of the particular event to figure out *when* the max stream position has caught up to the event and we can notify people about it.

This is to maintain the distinction between the position of an item in the stream (i.e. event A has stream ID 513) and a token that can be used to partition the stream (i.e. give me all events after stream ID 352). This distinction becomes important when the tokens are more complicated than a single number, which they will be once we start tracking the position of multiple writers in the tokens.

The valid operations here are:

1. Is a position before or after a token
2. Fetching all events between two tokens
3. Merging multiple tokens to get the "max", i.e. `C = max(A, B)` means that for all positions P where P is before A *or* before B, then P is before C.

Future PR will change the token type to a dedicated type.
2020-09-10 13:24:43 +01:00
..
_scripts Replace all remaining six usage with native Python 3 equivalents (#7704) 2020-06-16 08:51:47 -04:00
api Show a confirmation page during user password reset (#8004) 2020-09-10 11:45:12 +01:00
app Show a confirmation page during user password reset (#8004) 2020-09-10 11:45:12 +01:00
appservice Stop sub-classing object (#8249) 2020-09-04 06:54:56 -04:00
config Show a confirmation page during user password reset (#8004) 2020-09-10 11:45:12 +01:00
crypto Stop sub-classing object (#8249) 2020-09-04 06:54:56 -04:00
events Stop sub-classing object (#8249) 2020-09-04 06:54:56 -04:00
federation Catch up after Federation Outage (split, 2): Track last successful stream ordering after transmission (#8247) 2020-09-04 15:06:51 +01:00
groups Stop sub-classing object (#8249) 2020-09-04 06:54:56 -04:00
handlers Clean up Notifier.on_new_room_event code path (#8288) 2020-09-10 13:24:43 +01:00
http Stop sub-classing object (#8249) 2020-09-04 06:54:56 -04:00
logging Use the right constructor for log records (#8278) 2020-09-08 14:52:51 +01:00
metrics Stop sub-classing object (#8249) 2020-09-04 06:54:56 -04:00
module_api Stop sub-classing object (#8249) 2020-09-04 06:54:56 -04:00
push Clean up Notifier.on_new_room_event code path (#8288) 2020-09-10 13:24:43 +01:00
replication Clean up Notifier.on_new_room_event code path (#8288) 2020-09-10 13:24:43 +01:00
res/templates Show a confirmation page during user password reset (#8004) 2020-09-10 11:45:12 +01:00
rest Show a confirmation page during user password reset (#8004) 2020-09-10 11:45:12 +01:00
server_notices Stop sub-classing object (#8249) 2020-09-04 06:54:56 -04:00
spam_checker_api Stop sub-classing object (#8249) 2020-09-04 06:54:56 -04:00
state Stop sub-classing object (#8249) 2020-09-04 06:54:56 -04:00
static Clean-up the fallback login code. (#7657) 2020-06-10 09:50:39 -04:00
storage Merge branch 'release-v1.20.0' into develop 2020-09-10 10:15:02 +01:00
streams Clean up types for PaginationConfig (#8250) 2020-09-08 15:00:17 +01:00
util Remove some unused distributor signals (#8216) 2020-09-09 12:22:00 -04:00
__init__.py 1.20.0rc2 2020-09-09 17:08:33 +01:00
event_auth.py Convert events worker database to async/await. (#8071) 2020-08-18 16:20:49 -04:00
notifier.py Clean up Notifier.on_new_room_event code path (#8288) 2020-09-10 13:24:43 +01:00
python_dependencies.py Bump canonicaljson to version 1.4.0 (#8262) 2020-09-07 12:21:38 +01:00
secrets.py Stop sub-classing object (#8249) 2020-09-04 06:54:56 -04:00
server.py Add comment explaining cast 2020-08-11 22:01:12 +01:00
types.py Add types to StreamToken and RoomStreamToken (#8279) 2020-09-08 16:48:15 +01:00
visibility.py Convert groups and visibility code to async / await. (#7951) 2020-07-27 12:32:08 -04:00