1846 Commits

Author SHA1 Message Date
Kegan Dougal
ea3baf2351 v0.99.18 v0.99.18 2024-05-23 11:07:56 +01:00
Kegan Dougal
98b12cba6a
Merge pull request #441 from matrix-org/s7evink/startup-perf
Optimize getting the latest events by type per room
2024-05-21 18:13:06 +01:00
Till Faelligen
4b70d7d55f
Return err and not nil 2024-05-21 16:17:06 +02:00
Till Faelligen
ce15a2800c
Remove materialized view and use a recursive CTE instead to get unique
event_types
2024-05-21 16:16:17 +02:00
Till Faelligen
9eee30b152
Add a materialized view for event_types and use it in an updated query 2024-05-21 15:27:15 +02:00
Kegan Dougal
f25087d56a
Merge pull request #440 from matrix-org/kegan/patch-device-lists
e2ee extension: ensure null is not sent when we mean []
2024-05-20 14:06:56 +01:00
Kegan Dougal
451f6fb9c8 Add regression test 2024-05-20 14:02:29 +01:00
Kegan Dougal
e295c31ab7 Ensure null is not sent when we mean [] 2024-05-20 13:57:24 +01:00
Kegan Dougal
d5b3e4b33d
Merge pull request #439 from gnieto/fix/url-escape
fix: urlencode since opaque string
2024-05-20 13:12:46 +01:00
Guillem Nieto Taló
45f3e012db fix: urlencode since opaque string
Since/next batch is an opaque string and might need to be urlencoded
before being sent to the server.

Signed-off-by: Guillem Nieto <gnieto.talo@gmail.com>
2024-05-20 12:09:31 +02:00
Kegan Dougal
425a5d4a2f
Merge pull request #436 from matrix-org/s7evink/optimize-latest-event-in-room
Optimize getting the latest events in each room
2024-05-20 09:24:02 +01:00
Kegan Dougal
1551ccd7c9
Merge pull request #437 from matrix-org/kegan/device-data-table
Refactor device data
2024-05-20 09:11:17 +01:00
Kegan Dougal
3fc49bd4ea Migration review comments 2024-05-20 08:37:09 +01:00
Kegan Dougal
fdbebaea68 Some review comments; swap to UPDATE..RETURNING 2024-05-20 08:22:48 +01:00
Kegan Dougal
35c9fd4d95 Remove spurious return 2024-05-17 17:10:05 +01:00
Kegan Dougal
af1f34861e Ensure txns are closed so we can wipe the db for other tests 2024-05-17 16:09:02 +01:00
Kegan Dougal
5028f93f83 If there's no updates, don't insert anything 2024-05-17 15:37:45 +01:00
Kegan Dougal
fcd9b490f9 Debug logging 2024-05-17 15:20:18 +01:00
Kegan Dougal
b6f2f9d273 Use a CURSOR 2024-05-17 14:48:08 +01:00
Kegan Dougal
b383ed0d82 Add migrations and refactor internal structs 2024-05-17 13:45:14 +01:00
Till Faelligen
425ed4efba
Fix order of params and tell pq what $1 is 2024-05-17 11:04:59 +02:00
Till Faelligen
1ae5b5cb3d
Also optimize LatestEventNIDInRooms 2024-05-17 10:41:28 +02:00
Kegan Dougal
2cd9a81ab2 Add DeviceListTable
Shift over unit tests from DeviceDataTable
2024-05-17 09:37:38 +01:00
Till Faelligen
3ca77f2bc0
Optimize getting the latest events in each room
Signed-off-by: Till Faelligen <2353100+S7evinK@users.noreply.github.com>
2024-05-17 10:27:12 +02:00
Kegan Dougal
693587ef7e v0.99.17 v0.99.17 2024-05-10 14:25:32 +01:00
Kegan Dougal
0d22cf1da5
Merge pull request #432 from matrix-org/kegan/device-list-updates
Ensure device list updates are robust to race conditions and network failures
2024-05-10 10:35:09 +01:00
Kegan Dougal
150d9d6371
Merge pull request #433 from matrix-org/kegan/sign
Sign releases
2024-05-09 16:37:07 +01:00
Kegan Dougal
39f0d220e0 Maybe sign releases very-good-sign-test 2024-05-09 16:03:29 +01:00
Kegan Dougal
f564f2d774 Redo the device data unit tests
They were A) confusing and B) testing the wrong thing as they got refactored
after the bad refactor of the source code..
2024-05-09 15:32:21 +01:00
Kegan Dougal
c5b0afb2be bugfix: ensure we send back device list updates at the correct time
Otherwise we can cause lost device list updates if the client resets
the connection (as the device list update won't be in any in-memory cache).
2024-05-09 12:36:18 +01:00
Kegan Dougal
5816c60e33 Add SELECT .. FOR UPDATE clauses to DeviceDataTable
As we are selecting... for updates. Without this, we can drop
updates to the floor incorrectly.

See https://github.com/matrix-org/sliding-sync/issues/430
2024-05-08 14:26:24 +01:00
Kegan Dougal
8c76aad4e9
Merge pull request #425 from csett86/patch-1
README: document prebuild binaries
2024-04-26 16:42:35 +01:00
Christoph Settgast
3e0162d70b
README: document prebuild binaries
Now that there is a release which is statically built, advertise it in the README as well
2024-04-26 17:36:50 +02:00
Kegan Dougal
66fd58bc49 v0.99.16 v0.99.16 2024-04-26 13:42:42 +01:00
Kegan Dougal
91d34b6b88
Merge pull request #424 from matrix-org/kegan/msc4115-unstable
Check for unstable prefix in MSC4115
2024-04-26 13:41:23 +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
abf5aeff82
Merge pull request #422 from matrix-org/kegan/db-size
Clean the syncv3_snapshots table periodically
2024-04-24 16:55:25 +01:00
Kegan Dougal
b0ab21ea90
Merge pull request #423 from matrix-org/kegan/msc4115
Remove MSC4115 unsigned.membership field
2024-04-24 16:55:13 +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
Kegan Dougal
a1b5e48529 Run the cleaner on startup 2024-04-22 08:59:23 +01:00
Kegan Dougal
5dae70069b Clean the syncv3_snapshots table periodically
Also cleans the transaction table periodically.

Fixes https://github.com/matrix-org/sliding-sync/issues/372

On testing, this cuts db size to about 1/3 of its original size.
2024-04-22 08:55:05 +01:00
Kegan Dougal
c18961bb46
Merge pull request #418 from matrix-org/kegan/account-data-dupe
bugfix: don't send dupe room account data
2024-04-12 15:03:01 +01:00
Kegan Dougal
236f065953 Given we only process 1 update in this function, return not break 2024-04-12 08:34:37 +01:00
Kegan Dougal
48b5a549b6 Fix sending dupe room account data
Fixes #417
2024-04-11 17:16:26 +01:00
Kegan Dougal
a7152348ac Add regression test for https://github.com/matrix-org/sliding-sync/issues/417 2024-04-11 16:08:33 +01:00
kegsay
8750e1c435
Merge pull request #410 from matrix-org/kegan/race-tests
Fix race conditions in tests
2024-03-11 15:01:26 +00:00
Kegan Dougal
05a82a43dc Same race pattern as timeSince for timeSleep 2024-03-11 12:06:13 +00:00
Kegan Dougal
4d54faa1a6 Fix remaining race conditions; add -race to CI 2024-03-11 10:30:03 +00:00
Kegan Dougal
c7dd361ca6 Use atomic.Bool rather than bool in tests to fix race detector issues 2024-03-11 10:22:18 +00:00