273 Commits

Author SHA1 Message Date
David Robertson
5bf7ac6111
Fix incorrect check on txns table migration 2023-05-19 11:19:46 +01:00
David Robertson
ae0e14276d
Improve migration logging 2023-05-18 10:39:52 +01:00
David Robertson
d060c854e1
Merge pull request #119 from matrix-org/dmr/migration-fix
Migration: cleanup stale txns rows
2023-05-18 10:30:10 +01:00
David Robertson
e05a901822
Merge pull request #113 from matrix-org/dmr/panic-sentry
Capture, report and reraise panics in `Listen`
2023-05-17 18:20:01 +01:00
David Robertson
9ddc172d6a
Migration: check number of tokens loaded 2023-05-17 17:05:24 +01:00
David Robertson
1e1db04f50
Migration: cleanup stale txns rows
And use a simpler query. What was I thinking???
2023-05-17 17:05:24 +01:00
David Robertson
9c4bc62fc9
Another migration fix 2023-05-17 12:02:16 +01:00
David Robertson
ce8837bed3
Fix the migration to correctly populate the tokens table 2023-05-17 11:12:03 +01:00
David Robertson
85e68a2d94
Capture, report and reraise panics in Listen 2023-05-16 17:35:47 +01:00
David Robertson
5503b9d10b
Fixup comments 2023-05-15 15:39:08 +01:00
David Robertson
0d7edab7ca
Tweak logging 2023-05-15 12:24:58 +01:00
David Robertson
9c41d588fe
Improve logging 2023-05-12 12:24:13 +01:00
David Robertson
716e03ab97
Fix startup detection logic 2023-05-12 12:23:54 +01:00
David Robertson
d29a65b81f
Create and write to the tokens table!!! 2023-05-10 12:45:01 +01:00
David Robertson
d3a81adea2
Migrate on startup 2023-05-10 12:12:05 +01:00
David Robertson
ce284370b0
Don't run migration if the DB hasn't been created 2023-05-10 11:59:23 +01:00
David Robertson
0dc7923244
Tweak comments 2023-05-10 11:32:55 +01:00
David Robertson
a2d8900268
Clean-up stale ack pos rows
or else we can't enforce non-null user ids in this table
2023-05-10 11:22:30 +01:00
David Robertson
1dd19b6ace
More cleanup 2023-05-09 20:35:10 +01:00
David Robertson
d74cf83ee6
Actually, looks like we need to cleanup expired devices 2023-05-09 20:26:13 +01:00
David Robertson
cceb9d1f46
keep to_device pkey (it's a seqno) 2023-05-09 19:37:03 +01:00
David Robertson
63d021120a
Handle 401s from /whoami
that was easier than expected!
2023-05-09 19:21:54 +01:00
David Robertson
af5cd42231
TODO: handle 401s 2023-05-09 19:00:02 +01:00
David Robertson
e5989f9ebc
Improve logging; fail after trying all devices 2023-05-09 18:59:45 +01:00
David Robertson
1a7160787e
Fix various typos 2023-05-09 18:41:32 +01:00
David Robertson
336cf1869a
Fix isMigrated to check for a table w/ new column 2023-05-09 17:32:05 +01:00
David Robertson
b4bd1054d2
Add dirty entry point for testing the migration 2023-05-09 14:12:43 +01:00
David Robertson
e73f689279
Improve logging and comments 2023-05-09 13:55:47 +01:00
David Robertson
20a8861c4b
Migration logic 2023-05-03 19:18:32 +01:00
David Robertson
0f90e70c3e
Pull out decrypt to free function 2023-05-03 18:43:26 +01:00
David Robertson
a9ed3094fd
Skeleton of the migration 2023-05-03 18:37:51 +01:00
David Robertson
b428ede1ca
Update txns table 2023-05-02 18:16:14 +01:00
David Robertson
e1bc972ff7
Update the to-device table 2023-05-02 18:16:14 +01:00
David Robertson
bf8007d00a
TokenWithSince -> TokenForPoller
Not super thrilled with this name
2023-05-02 17:47:02 +01:00
David Robertson
14cf83872a
Warn if the token we want to delete doesn't exist 2023-05-02 17:37:09 +01:00
David Robertson
650c91ef55
Tweak GetTokenAndSince impl formatting 2023-05-02 17:02:54 +01:00
David Robertson
5404893b53
Tweak tests 2023-05-02 16:57:11 +01:00
David Robertson
ce6cafc509
Tweak logging 2023-05-02 14:07:10 +01:00
David Robertson
fb833d74b2
Remove extra log var in sync2 2023-05-02 12:09:20 +01:00
David Robertson
c1b1de5456
Delete tokens on expiry, to force /whoami lookup 2023-04-28 18:50:43 +01:00
David Robertson
db32a58428
Cleanup devices table 2023-04-28 18:50:43 +01:00
David Robertson
76663e5cf5
Tokens table fixes 2023-04-28 18:50:43 +01:00
David Robertson
ca8a2d72c4
Make ConnID hold a UserID 2023-04-28 18:50:42 +01:00
David Robertson
adb3ba318a
Get pollers to lookup tokens 2023-04-28 17:05:48 +01:00
David Robertson
181cfba19e
Introduce PollerID 2023-04-28 17:05:46 +01:00
David Robertson
4f62e7af50
More work on fetching tokens from DB 2023-04-28 12:29:51 +01:00
David Robertson
e71d954030
Introduce tokens table 2023-04-28 01:37:45 +01:00
David Robertson
b91dbae895
Introduce a sync2.Storage struct 2023-04-27 20:43:06 +01:00
David Robertson
c4a2984cba
Rename Storage to DevicesTable 2023-04-27 19:07:10 +01:00
David Robertson
206ee815b3
Merge pull request #71 from matrix-org/dmr/gappy-state
Inject state blocks from incremental polls into the room timeline
2023-04-24 17:58:53 +01:00