94 Commits

Author SHA1 Message Date
Kegan Dougal
fdbebaea68 Some review comments; swap to UPDATE..RETURNING 2024-05-20 08:22:48 +01:00
Kegan Dougal
b383ed0d82 Add migrations and refactor internal structs 2024-05-17 13:45:14 +01:00
Kegan Dougal
9620a624d7 Comment on escaped dots 2024-04-26 12:16:39 +01:00
Kegan Dougal
0af85096aa Check for unstable prefix in MSC4115 2024-04-25 15:15:42 +01:00
Kegan Dougal
c4f2617a2d Remove MSC4115 unsigned.membership field
With integration tests. This is required because this field
is scoped per-v2-user, but because the proxy deduplicates events
it means we might see the membership value for a different user.
We can't set this field correctly as we lack that information, so
rather than lie to clients instead just delete the field.

Fixes https://github.com/matrix-org/sliding-sync/issues/421
2024-04-24 16:20:07 +01:00
David Robertson
c239cacc83
Initialise: handle gappy polls and ditch prependStateEvents 2023-11-03 15:42:25 +00:00
David Robertson
f595aed2c5
Add a separate payload for redacting state
So that we don't end up nuking conns unnecessarily.
2023-11-01 19:03:17 +00:00
Till Faelligen
06b6bbedf3
Move to else, as we otherwise count failed pollers as well 2023-09-22 09:44:52 +02:00
Till Faelligen
0c149ba78d
Update the poller metrics after the poller was started 2023-09-22 09:41:48 +02:00
David Robertson
d3ba1f1c30
Move TimelineResponse back to sync2 2023-09-19 12:41:25 +01:00
David Robertson
957bdee9d2
Merge branch 'main' into dmr/invalidate-timelines 2023-09-19 12:40:13 +01:00
David Robertson
df01e50438
Pass TimelineResponse struct around 2023-09-13 19:17:53 +01:00
David Robertson
0d4e8c6df9
Remove debug and improve comments 2023-09-12 16:25:10 +01:00
David Robertson
afe589921e
Invalidation: don't bother propagating a snapshot 2023-09-08 18:17:13 +01:00
David Robertson
f4555f3c22
Emit Invalidation payloads 2023-09-07 20:41:11 +01:00
David Robertson
777cb357fe
Factor out AccumulateResult struct 2023-09-07 20:41:11 +01:00
David Robertson
24c63463eb
Fix mockPollerMap interface 2023-09-06 13:11:17 +01:00
David Robertson
984ea4fcf2
properly populate Success fields 2023-09-06 13:11:00 +01:00
David Robertson
635e20a1c7
Plumb through the failure mode 2023-09-06 12:05:00 +01:00
David Robertson
b6534aa45e
Add Success field to V2InitialSyncComplete 2023-09-06 11:15:06 +01:00
David Robertson
873db181b0
Improve EnsurePolling logging 2023-09-05 18:41:40 +01:00
David Robertson
ff7120245a
Merge pull request #242 from matrix-org/dmr/purge-inactive-pollers 2023-08-16 13:43:46 +01:00
Kegan Dougal
d63864f494 Modify V2DataReceiver to allow error returns
On receipt of errors, do not advance the since token. Only added to
functions where losing data is bad (events, to-device msgs, etc).

With unit tests, which actually caught some interesting failure modes.
2023-08-15 18:51:11 +01:00
David Robertson
c215503854
ExpireOldPollers: only log when we want to expire 2023-08-15 11:03:56 +01:00
David Robertson
ea4f5e3ab2
Return early if ExpireOldPollers fails 2023-08-15 11:01:58 +01:00
David Robertson
db3cbb9711
Don't segfault tearing handler2 down if pollers weren't started 2023-08-10 13:19:25 +01:00
David Robertson
00a9e31ed1
Integration test 2023-08-10 13:11:58 +01:00
David Robertson
93bac84007
Rearrange and rename cleanup ticker 2023-08-10 12:15:34 +01:00
David Robertson
d659824edf
Expire pollers method 2023-08-09 11:46:12 +01:00
David Robertson
f7dabdc311
Return whether or not a poller was created 2023-08-09 11:45:45 +01:00
David Robertson
c2981ed67b
Sketch the cleanup loop 2023-08-09 10:50:02 +01:00
Till Faelligen
414fa865db
Merge branch 'main' of github.com:matrix-org/sliding-sync into s7evink/devicedata 2023-08-03 09:24:13 +02:00
kegsay
4b1d51ee80
Merge branch 'main' into kegan/account-data-bugs 2023-08-02 06:57:54 -07:00
Till Faelligen
c0aa1e3214
Merge branch 'main' of github.com:matrix-org/sliding-sync into s7evink/devicedata 2023-08-02 14:53:21 +02:00
Till Faelligen
5846873d43
Merge branch 'main' of github.com:matrix-org/sliding-sync into s7evink/typing 2023-08-02 14:02:44 +02:00
Till Faelligen
fc95c16daf
Merge branch 'main' of github.com:matrix-org/sliding-sync into s7evink/devicedata 2023-08-02 14:01:34 +02:00
kegsay
a61a3fdde2
Merge pull request #235 from matrix-org/kegan/leave-event-shouldnt-snapshot
Do not make snapshots for lone leave events
2023-08-02 04:53:40 -07:00
Kegan Dougal
e4f9aef708 Fix e2e test: actually modify the event to detect changes; bail early if we dedupe everything 2023-08-02 12:29:31 +01:00
Kegan Dougal
1686c4b098 Correct comment 2023-08-02 11:50:59 +01:00
Kegan Dougal
0c45b71942 Suppress dupe account data events 2023-08-02 11:49:28 +01:00
Till Faelligen
a085e1fc04
Merge branch 'main' of github.com:matrix-org/sliding-sync into s7evink/devicedata 2023-08-02 11:07:40 +02:00
Till Faelligen
d2cf57de45
Merge branch 'main' of github.com:matrix-org/sliding-sync into s7evink/typing 2023-08-02 09:11:23 +02:00
Till Faelligen
a28371506b
Merge branch 'main' of github.com:matrix-org/sliding-sync into s7evink/typing 2023-08-01 13:24:26 +02:00
David Robertson
139068d305
Move PendingTxnIDs to the handler2.Handler
More sense conceptually---pollermap doesn't track any cross-poller
state---and removes some indirection.

Followup to #146. No functional changes.
2023-08-01 11:28:23 +01:00
Kegan Dougal
6623ddb9e3 Do not make snapshots for lone leave events
Specifically this is targetting invite rejections, where the leave
event is inside the leave block of the sync v2 response.

Previously, we would make a snapshot with this leave event. If the
proxy wasn't in this room, it would mean the room state would just
be the leave event, which is wrong. If the proxy was in the room,
then state would correctly be rolled forward.
2023-07-31 17:53:15 +01:00
David Robertson
28b11f86a8
Emit txn id payloads when there are no new events 2023-07-31 13:29:34 +01:00
Till Faelligen
3a2001f07d
Use PollerID instead of device ID 2023-07-27 12:33:10 +02:00
Till Faelligen
ee714ea95e
Set a fillfactor of 90%, use DeepEqual instead of marshal -> bytes.Equal 2023-07-26 08:56:29 +02:00
David Robertson
4a6623ff77
Include room ID in the txnid payload 2023-07-25 19:08:11 +01:00
David Robertson
008157c146
poller: send all-clear 2023-07-25 19:08:10 +01:00