forked-synapse/synapse/handlers
Eric Eastwood 11db575218
Sliding Sync: Use stream_ordering based timeline pagination for incremental sync (#17510)
Use `stream_ordering` based `timeline` pagination for incremental
`/sync` in Sliding Sync. Previously, we were always using a
`topological_ordering` but we should only be using that for historical
scenarios (initial `/sync`, newly joined, or haven't sent the room down
the connection before).

This is slightly different than what the [spec
suggests](https://spec.matrix.org/v1.10/client-server-api/#syncing)

> Events are ordered in this API according to the arrival time of the
event on the homeserver. This can conflict with other APIs which order
events based on their partial ordering in the event graph. This can
result in duplicate events being received (once per distinct API
called). Clients SHOULD de-duplicate events based on the event ID when
this happens.

But we've had a [discussion below in this
PR](https://github.com/element-hq/synapse/pull/17510#discussion_r1699105569)
and this matches what Sync v2 already does and seems like it makes
sense. Created a spec issue
https://github.com/matrix-org/matrix-spec/issues/1917 to clarify this.

Related issues:

 - https://github.com/matrix-org/matrix-spec/issues/1917
 - https://github.com/matrix-org/matrix-spec/issues/852
 - https://github.com/matrix-org/matrix-spec-proposals/pull/4033
2024-08-07 11:27:50 -05:00
..
ui_auth Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
__init__.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
account_data.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
account_validity.py Merge remote-tracking branch 'gitlab/clokep/license-license' into new_develop 2023-12-13 15:11:56 +00:00
account.py Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
admin.py Sliding Sync: Use stream_ordering based timeline pagination for incremental sync (#17510) 2024-08-07 11:27:50 -05:00
appservice.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
auth.py Bump mypy from 1.5.1 to 1.8.0 (#16901) 2024-03-13 17:05:57 +00:00
cas.py Allows CAS SSO flow to provide user IDs composed of numbers only (#17098) 2024-05-14 13:55:32 +01:00
deactivate_account.py Upon deactivation, forget all of the user's rooms (#17400) 2024-07-05 11:56:52 +01:00
device.py Sliding Sync: Add E2EE extension (MSC3884) (#17454) 2024-07-22 15:40:06 -05:00
devicemessage.py Ignore attempts to send to-device messages to bad users (#17240) 2024-05-29 11:52:48 +01:00
directory.py Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
e2e_keys.py Fix failures property in /keys/query (#17499) 2024-07-30 09:51:24 +01:00
e2e_room_keys.py Speed up room keys query by using read/write lock (#17461) 2024-07-22 14:51:17 +01:00
event_auth.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
events.py Include user membership on events (#17282) 2024-06-13 21:45:54 +00:00
federation_event.py Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
federation.py Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
identity.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
initial_sync.py Include user membership on events (#17282) 2024-06-13 21:45:54 +00:00
jwt.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
message.py Add support for MSC3823 - Account Suspension Part 2 (#17255) 2024-06-24 14:21:22 +01:00
oidc.py Add OIDC config to add extra parameters to the authorize URL (#16971) 2024-03-22 10:35:11 +00:00
pagination.py Sliding Sync: Use stream_ordering based timeline pagination for incremental sync (#17510) 2024-08-07 11:27:50 -05:00
password_policy.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
presence.py Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
profile.py Fix undiscovered linter errors (#17166) 2024-05-08 14:57:32 +00:00
push_rules.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
read_marker.py Do not refuse to set read_marker if previous event_id is in wrong room (#16990) 2024-03-21 18:43:07 +00:00
receipts.py Sliding Sync: Add typing notification extension (MSC3961) (#17505) 2024-07-31 13:20:23 -05:00
register.py Log exceptions when failing to auto-join new user according to the auto_join_rooms option. (#17176) 2024-05-22 14:22:33 +01:00
relations.py Include user membership on events (#17282) 2024-06-13 21:45:54 +00:00
room_list.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
room_member_worker.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
room_member.py Fix deduplicating of membership events to not create unused state groups. (#17164) 2024-05-30 11:33:48 +00:00
room_summary.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
room.py Sliding Sync: Use stream_ordering based timeline pagination for incremental sync (#17510) 2024-08-07 11:27:50 -05:00
saml.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
search.py Include user membership on events (#17282) 2024-06-13 21:45:54 +00:00
send_email.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
set_password.py Update license headers 2023-11-21 15:29:58 -05:00
sliding_sync.py Sliding Sync: Use stream_ordering based timeline pagination for incremental sync (#17510) 2024-08-07 11:27:50 -05:00
sso.py Bring auto-accept invite logic into Synapse (#17147) 2024-05-21 20:09:17 +00:00
state_deltas.py Update license headers 2023-11-21 15:29:58 -05:00
stats.py Sliding Sync: Update filters to be robust against remote invite rooms (#17450) 2024-07-30 13:20:29 -05:00
sync.py Sliding Sync: Use stream_ordering based timeline pagination for incremental sync (#17510) 2024-08-07 11:27:50 -05:00
typing.py Sliding Sync: Add typing notification extension (MSC3961) (#17505) 2024-07-31 13:20:23 -05:00
user_directory.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
worker_lock.py Improve lock performance when a lot of locks are waiting (#16840) 2024-03-14 13:49:54 +00:00