Commit graph

368 commits

Author SHA1 Message Date
Devon Hudson acb6f65c77
Add doc comments for fedapi assumed offline db interface 2023-01-19 15:38:13 -07:00
Devon Hudson f4c328fed8
Add doc comments for fedapi relay server db interface 2023-01-19 15:34:50 -07:00
Devon Hudson 3c54ea1d56
Merge branch 'main' into mailbox 2023-01-19 14:47:14 -07:00
Devon Hudson 491ee90d49
Add missed file updates in refactor 2023-01-19 14:33:30 -07:00
Devon Hudson 3f10d42c1b
Remove name ghosting when referring to receipts 2023-01-19 14:30:18 -07:00
Neil 738686ae68
Add /_dendrite/admin/purgeRoom/{roomID} (#2662)
This adds a new admin endpoint `/_dendrite/admin/purgeRoom/{roomID}`. It
completely erases all database entries for a given room ID.

The roomserver will start by clearing all data for that room and then
will generate an output event to notify downstream components (i.e. the
sync API and federation API) to do the same.

It does not currently clear media and it is currently not implemented
for SQLite since it relies on SQL array operations right now.

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
Co-authored-by: Till Faelligen <2353100+S7evinK@users.noreply.github.com>
2023-01-19 21:02:32 +01:00
Devon Hudson 18dec3807d
Add comments to dest queue relay server sending 2023-01-19 10:53:09 -07:00
Devon Hudson e1c50b78bd
Rename destination queue variable for correctness 2023-01-19 10:10:39 -07:00
Devon Hudson 91126e6efa
Fix sqlite unit test parallelization issues 2023-01-18 16:02:32 -07:00
Devon Hudson 8090f20c20
Remove redundant tests for assumed offline table 2023-01-17 10:33:58 -07:00
Till 0d0280cf5f
/sync performance optimizations (#2927)
Since #2849 there is no limit for the current state we fetch to
calculate history visibility. In large rooms this can cause us to fetch
thousands of membership events we don't really care about.
This now only gets the state event types and senders in our timeline,
which should significantly reduce the amount of events we fetch from the
database.

Also removes `MaxTopologicalPosition`, as it is an unnecessary DB call,
given we use the result in `topological_position < $1` calls.
2023-01-17 10:08:23 +01:00
Devon Hudson 16eb9e4e49
Cleanup relay servers table and add batch deletion to sqlite 2023-01-13 16:00:36 -07:00
Devon Hudson 98d4e4f89b
Simplify assumed offline table sql 2023-01-13 11:54:13 -07:00
Devon Hudson a252ad4516
Isolate p2p specific federation & federation db apis 2023-01-13 11:40:25 -07:00
Devon Hudson f45d612ebd
Refactor federationapi db to better distinguish p2p specifics 2023-01-13 11:35:49 -07:00
Devon Hudson e83940b5cf
Move in memory test databases into test package 2023-01-12 16:11:15 -07:00
Devon Hudson 75bc8ab826
Various typos and whitespace cleanup 2023-01-12 14:16:23 -07:00
Devon Hudson 4626f6c9d8
Fix license headers on some files 2023-01-12 14:05:55 -07:00
Devon Hudson e089015020
Refactor federation perform relay bailout to reduce duplication 2023-01-12 13:24:28 -07:00
Devon Hudson 0f7ac684b7
Remove accidentally added file 2023-01-12 12:43:52 -07:00
Devon Hudson b2c8094643
Name test constants for clarity 2023-01-12 12:27:06 -07:00
Devon Hudson 73c42232fc
Fix race in refactored statistics 2023-01-12 12:20:03 -07:00
Devon Hudson e54e036948
Remove code complexity when adding relay server 2023-01-12 11:35:54 -07:00
Devon Hudson 7fb194fc61
Rework statistics offline/blacklist clearing logic to flow better 2023-01-12 11:23:08 -07:00
Devon Hudson f6a9a77ecc
Check assumed offline state in statistics test 2023-01-12 11:22:10 -07:00
Devon Hudson cba0644ec2
Refactor stats success to clarify whether sent via relay or direct 2023-01-12 10:44:52 -07:00
Devon Hudson 75fd677081
Merge branch 'main' into mailbox 2023-01-12 09:29:16 -07:00
Devon Hudson 477a44faa6
Always initialize statistics server map 2023-01-12 09:23:03 -07:00
Devon Hudson 07d2976854
Finish s&f rename refactor 2023-01-12 08:21:26 -07:00
Devon Hudson 40563741da
Another incremental renaming refactor for s&f 2023-01-11 16:42:55 -07:00
Devon Hudson ed71fe63ae
Another incremental renaming refactor of relay server 2023-01-11 16:28:16 -07:00
Devon Hudson 7b2cbc7133
Incremental renaming refactor of relay server 2023-01-11 14:14:57 -07:00
Devon Hudson 18cc81fb9f
Add tests for caching relay servers from db 2022-12-23 17:07:51 -07:00
Devon Hudson 3eebf431ef
Add test for federation directory lookup handler 2022-12-23 16:40:28 -07:00
Devon Hudson 90690b96ff
Add test for federation keys endpoint 2022-12-23 15:22:26 -07:00
Devon Hudson be43dfe5e0
Add test for federation query profile endpoint 2022-12-23 10:17:26 -07:00
Devon Hudson 8b53cdce57
Add test for federation query directory endpoint 2022-12-23 10:08:03 -07:00
Devon Hudson f18a838297
Add test for federation send endpoint 2022-12-23 09:14:24 -07:00
Devon Hudson b417a09b07
Add fed query relay servers test 2022-12-23 08:04:14 -07:00
Devon Hudson f76336151c
Add fed wakeup servers test 2022-12-23 07:53:56 -07:00
Devon Hudson ead825b1bf
Add fed storage tests for assumed offline & relay servers 2022-12-22 10:38:34 -07:00
Devon Hudson 9a159e3ae0
Consolidate relay servers table prepare statements 2022-12-22 10:05:23 -07:00
Devon Hudson 6c47069b0b
Remove duplicate db statement prepares 2022-12-22 09:47:26 -07:00
Devon Hudson e5feacbfc0
Consolidate relay db prepare statements 2022-12-22 09:42:56 -07:00
devonh 044f1d1f37
Merge branch 'main' into mailbox 2022-12-22 15:22:41 +00:00
Till Faelligen 09dff951d6
More flakey tests 2022-12-22 13:04:32 +01:00
Till Faelligen beea2432e6
Fix flakey test 2022-12-22 11:31:54 +01:00
Till d3db542fbf
Add federation peeking table tests (#2920)
As the title says, adds tests for inbound/outbound peeking federation
table tests.

Also removes some unused code
2022-12-22 10:56:20 +01:00
Devon Hudson 9f27e691fc
Remove unused code from fed send route tests 2022-12-19 15:14:53 -07:00
Devon Hudson 9f8a78774a
Merge branch 'main' into mailbox 2022-12-19 09:53:10 -07:00