aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-05-19syncapi: don't return early for no-op incremental syncs (#2473)kegsay
* syncapi: don't return early for no-op incremental syncs Comments explain why, but basically it's an inefficient use of bandwidth and some sytests rely on /sync to block. * Honour timeouts * Actually return a response with timeout=0
2022-05-18Really SKIP_NODB (#2472)Till
* Really SKIP_NODB * Use fatalError in createLocalDB * Check if createdb exists * Revert change * Remove !Quiet
2022-05-17bugfix: fix race condition when updating presence via /sync (#2470)kegsay
* bugfix: fix race condition when updating presence via /sync Previously when presence is updated via /sync, we would send the presence update asyncly via NATS. This created a race condition: - If the presence update is processed quickly, the /sync which triggered the presence update would see an online presence. - If the presence update was processed slowly, the /sync which triggered the presence update would see an offline presence. This is the root cause behind the flakey sytest: 'User sees their own presence in a sync'. The fix is to ensure we update the database/advance the stream position synchronously for local users. * Bugfix for test
2022-05-17Remove debug loggingKegan Dougal
2022-05-17bugfix: E2EE device keys could sometimes not be sent to remote servers (#2466)kegsay
* Fix flakey sytest 'Local device key changes get to remote servers' * Debug logs * Remove internal/test and use /test only Remove a lot of ancient code too. * Use FederationRoomserverAPI in more places * Use more interfaces in federationapi; begin adding regression test * Linting * Add regression test * Unbreak tests * ALL THE LOGS * Fix a race condition which could cause events to not be sent to servers If a new room event which rewrites state arrives, we remove all joined hosts then re-calculate them. This wasn't done in a transaction so for a brief period we would have no joined hosts. During this interim, key change events which arrive would not be sent to destination servers. This would sporadically fail on sytest. * Unbreak new tests * Linting
2022-05-17Add docs which explain how to calculate coverage (#2468)kegsay
2022-05-16Add roomserver tests (3/4) (#2447)Till
* Add Room Aliases tests * Add Rooms table test * Move StateKeyTuplerSorter to the types package * Add StateBlock tests Some optimizations * Add State Snapshot tests Some optimization * Return []int64 and convert to pq.Int64Array for postgres * Move []types.EventNID back to rows.Next() * Update tests, rename SelectRoomIDs
2022-05-13Version 0.8.5 (#2461)v0.8.5Neil Alexander
* Version 0.8.5 * Update changelog * Update changelog
2022-05-13The Pinecone `gobind` demo must listen on `localhost` for `baseURL` to be ↵Neil Alexander
correct
2022-05-13Update README.mdNeil Alexander
2022-05-13Resolve over old and new extremities (#2457)Neil Alexander
* Feed existing state into state res when calculating state from new extremities * Remove duplicates * Fix bug * Sort and unique * Update to matrix-org/gomatrixserverlib#308 * Trim the slice properly * Update gomatrixserverlib again * Update to matrix-org/gomatrixserverlib#308
2022-05-13Update NATS Server to version 2.8.2 (#2460)Neil Alexander
2022-05-13Only try to get OTKs if the context isn't done yetTill Faelligen
2022-05-13Shuffle config Verify/Defaults a bit around (#2459)Till
2022-05-12Separate sample configs for monolith and polylith (#2456)Neil Alexander
* Update sample configs * Update references * Remove sections that are dead in the monolith sample
2022-05-12Fix `create-account` with global database settings (#2455)Till
* Fix create-account with global database settings * Avoid warning about open registration
2022-05-12Wait 100ms for events to be processed by syncapiKegan Dougal
2022-05-11Fix OTK upload spam (#2448)Till
* Fix OTK spam * Update comment * Optimize selectKeysCountSQL to only return max 100 keys * Return CurrentPosition if the request timed out * Revert "Return CurrentPosition if the request timed out" This reverts commit 7dbdda964189f5542048c06ce5ffc6d4da1814e6. Co-authored-by: kegsay <kegan@matrix.org>
2022-05-11Fix linkNeil Alexander
2022-05-11New documentation: https://matrix-org.github.io/dendrite/Neil Alexander
2022-05-11More syncapi tests (#2451)kegsay
* WIP tests for flakey create event * Uncomment all database test
2022-05-11Add RoomExists flag to QueryMembershipForUser (#2450)kegsay
Fixes https://github.com/matrix-org/complement/pull/369
2022-05-10Add roomserver tests (2/?) (#2445)Till
* Add invite table tests; move variable declarations * Add Membership table tests * Move variable declarations * Add PrevEvents table tests * Add Published table test * Add Redactions tests Fix bug in SQLite markRedactionValidatedSQL * PR comments, better readability for invite tests
2022-05-10Version 0.8.4v0.8.4Neil Alexander
2022-05-10Add indexes to `syncapi_output_room_events` table that satisfy the filters ↵Neil Alexander
(#2446)
2022-05-10Back out matrix-org/dendrite#2421 by restoring `http.Client`sNeil Alexander
This creates problems with non-HTTPS endpoints and should fix #2444.
2022-05-09🏗️ mediaapi/thumbnailer: fix build with bimg (#2440)database64128
Co-authored-by: kegsay <kegan@matrix.org>
2022-05-09Version 0.8.3 (#2431)v0.8.3Neil Alexander
* Version 0.8.3 * Update changelog
2022-05-09Begin adding syncapi component tests (#2442)kegsay
* Add very basic syncapi tests * Add a way to inject jetstream messages * implement add_state_ids * bugfixes * Unbreak tests * Remove now un-needed API call * Linting
2022-05-09Don't store invites in sync API that aren't relevant to local users (#2439)Neil Alexander
2022-05-09Federation consumer `adds_state_event_ids` tweak (#2441)Neil Alexander
* Don't ask roomserver for events we already have in federation API * Check number of events returned is as expected * Preallocate array * Improve shape a bit
2022-05-09Don't try to re-fetch the event if it is listed in `adds_state_event_ids` ↵Neil Alexander
(#2437) * Don't try to re-fetch the event in the output message * Try that again * Add the initial event into the set
2022-05-09Add roomserver tests (1/?) (#2434)Till
* Add EventJSONTable tests * Add eventJSON tests * Add EventStateKeysTable tests * Add EventTypesTable tests * Add Events Table tests Move variable declaration outside loops Switch to testify/assert for tests * Move variable declaration outside loop * Remove random data * Fix issue where the EventReferenceSHA256 is not set * Add more tests * Revert "Fix issue where the EventReferenceSHA256 is not set" This reverts commit 8ae34c4e5f78584f0edb479f5a893556d2b95d19. * Update GMSL * Add tests for duplicate entries * Test what happens if we select non-existing NIDs * Add test for non-existing eventType * Really update GMSL
2022-05-09One NATS instance per `BaseDendrite` (#2438)Neil Alexander
* One NATS instance per `BaseDendrite` * Fix roomserver
2022-05-09Update to matrix-org/gomatrixserverlib#307Neil Alexander
2022-05-09Add `(user_id, device_id)` index on OTK table (#2435)Neil Alexander
2022-05-06Version 0.8.3rc1v0.8.3rc1Neil Alexander
2022-05-06Simplify `calculateLatest` (#2430)Neil Alexander
* Simplify `calculateLatest` * Comments
2022-05-06Fix power level event auth bugs (update to matrix-org/gomatrixserverlib#306)Neil Alexander
2022-05-06Move LL cache (#2429)Till
2022-05-06Add `PolylithMode` base config option (#2428)Neil Alexander
* Add `PolylithMode` base config option * Polylith mode always uses HTTP APIs
2022-05-06Produce more useful event auth errors (update to ↵Neil Alexander
matrix-org/gomatrixserverlib#305)
2022-05-06Clean up interface definitions (#2427)kegsay
* tidy up interfaces * remove unused GetCreatorIDForAlias * Add RoomserverUserAPI interface * Define more interfaces * Use AppServiceInternalAPI for consistent naming * clean up federationapi constructor a bit * Fix monolith in -http mode
2022-05-06Add FAQ entry for anonymous stats (#2419)Till
2022-05-05Define component interfaces based on consumers (2/2) (#2425)kegsay
* convert remaining interfaces * Tidy up the userapi interfaces
2022-05-05Update to matrix-org/gomatrixserverlib#303Neil Alexander
2022-05-05Update table names for user API stats tableNeil Alexander
2022-05-05Don't log consumer errors on shutdownNeil Alexander
2022-05-05Define component interfaces based on consumers (1/2) (#2423)kegsay
* Specify interfaces used by appservice, do half of clientapi * convert more deps of clientapi to finer-grained interfaces * Convert mediaapi and rest of clientapi * Somehow this got missed
2022-05-05Use `gomatrixserverlib.Client` instead of `http.Client` (#2421)Neil Alexander
* Update to matrix-org/gomatrixserverlib#303 * Use `gomatrixserverlib.Client` for phone-home stats * Use `gomatrixserverlib.Client` for push notifications * Use `gomatrixserverlib.Client` for appservices * Use `gomatrixserverlib.Client` for three-PID invites