Commit graph

1314 commits

Author SHA1 Message Date
Till Faelligen 749ebfbd93 Revert "Add sqlite3 migration"
This reverts commit d113b03f64.
2020-11-09 17:31:31 +01:00
S7evinK 7169d0d2e4 Revert "Add postgres migration"
This reverts commit 722fe5a046.
2020-11-09 17:31:05 +01:00
Till Faelligen 8012204000 Use fmt.Errorf instead of pkg/errors 2020-11-09 17:21:43 +01:00
Till Faelligen fbd3fc626b Merge branch 'master' of https://github.com/matrix-org/dendrite into add-receipts-2 2020-11-06 20:41:01 +01:00
S7evinK eccd0d2c1b
Implement forgetting about rooms (#1572)
* Add basic storage methods

* Add internal api handler

* Add check for forgotten room

* Add /rooms/{roomID}/forget endpoint

* Add missing rsAPI method

* Remove unused parameters

* Add passing tests

Signed-off-by: Till Faelligen <tfaelligen@gmail.com>

* Add missing file

* Add postgres migration

* Add sqlite migration

* Use Forgetter to forget room

* Remove empty line

* Update HTTP status codes

It looks like the spec calls for these to be 400, rather than 403: https://matrix.org/docs/spec/client_server/r0.6.1#post-matrix-client-r0-rooms-roomid-forget

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2020-11-05 10:19:23 +00:00
Neil Alexander 2ce2112ddb
Update gjson for safe integer ranges 2020-11-05 09:42:28 +00:00
Petter Jakub Økland fe339c8b98
Created polylith reverse proxy sample for Hiawatha (#1571) 2020-10-28 16:37:56 +00:00
S7evinK d5675feb96
Add possibilty to configure MaxMessageBytes for sarama (#1563)
* Add configuration for max_message_bytes for sarama

* Log all errors when sending multiple messages

Signed-off-by: Till Faelligen <tfaelligen@gmail.com>

* Add missing config

* - Better comments on what MaxMessageBytes is used for
- Also sets the size the consumer may use
2020-10-27 14:11:37 +00:00
Neil Alexander c5888bb64c
Update Docker sample configs 2020-10-27 13:58:58 +00:00
Neil Alexander 0af35bec1a
Update documentation (#1569)
* Update dendrite-config.yaml

* Update README.md

* Update INSTALL.md

* Update INSTALL.md
2020-10-26 22:09:13 +00:00
Neil Alexander 59428cdde3
Version 0.2.1 (#1558)
* Version 0.2.1

* Credit where credit due

* Update CHANGES.md

* Include PRs
2020-10-22 12:38:12 +01:00
Adit Sachde b66b2eab32
Document dendrite server key format (#1520)
Co-authored-by: Kegsay <kegan@matrix.org>
2020-10-22 12:21:31 +01:00
Neil Alexander f32320a235
Exclude old state events from sync when consumed from roomserver (#1548)
* Exclude old room events from sync when consumed from roomserver

* Fix comment

* Experimental hack
2020-10-22 11:50:48 +01:00
Neil Alexander 3afc623098
Fix RewritesState bug (#1557)
* Set RewritesState once

* Check if any new state provided

* Obey rewritesState

* Don't nuke everything the sync API knows when purging state

* Fix panic from duplicate insert

* Consistency

* Use HasState

* Remove nolint

* Clean up joined rooms on state rewrite
2020-10-22 10:39:16 +01:00
Till Faelligen f064c48d93 Merge branch 'master' of https://github.com/matrix-org/dendrite into add-receipts-2 2020-10-21 19:17:45 +02:00
Till Faelligen d530801258 Fix issue with receipts getting overwritten 2020-10-21 19:16:44 +02:00
Till Faelligen 8d95effc6c Set receipt on request to /read_markers 2020-10-21 17:46:08 +02:00
Neil Alexander 04dc019e5e
Don't set empty state snapshots 2020-10-21 16:21:36 +01:00
Neil Alexander 534f9a9eb6
Refactor forward extremities (#1556)
* Add resolve-state helper

* Tweaks

* Refactor forward extremities, again

* Tweaks

* Minor optimisation

* Make path a bit clearer

* Only process state/membership if forward extremities have changed

* Usage comments in resolve-state
2020-10-21 15:37:07 +01:00
Till Faelligen bcf2bcfc95 Merge branch 'add-receipts-2' of github.com:S7evinK/dendrite into add-receipts-2 2020-10-21 14:55:00 +02:00
Till Faelligen d4a01d5595 Actually update the id, so it is correctly send in syncs 2020-10-21 14:48:34 +02:00
Vladislav Povalyaev e4f3f38f35
Update development percentages (#1553) 2020-10-20 20:49:03 +01:00
Kegsay 6b8791b868
Always call overridden form of GetLatestEventsForUpdate (#1554)
This ensures we don't make txns on sqlite still, which can cause
'database is locked' errors.
2020-10-20 19:32:33 +01:00
Neil Alexander 7612f64e3c
Update gomatrixserverlib to matrix-org/gomatrixserverlib#220 2020-10-20 17:23:04 +01:00
Neil Alexander 7c8be1517f
Merge branch 'master' into add-receipts-2 2020-10-20 17:14:38 +01:00
Neil Alexander 24e38c4135
Internal HTTP APIs over H2C (#1541)
* H2C on internal HTTP because SCIENCE

* Update comments
2020-10-20 17:13:12 +01:00
Neil Alexander 7ca89ef511
Update gomatrixserverlib 2020-10-20 17:10:37 +01:00
Neil Alexander 6a16d46fba
Version 0.2.0 (#1551)
* v0.2.0-rc2

* Update CHANGES.md (also with some markdown lint suggestions)

* Update version number

* Update CHANGES.md

* Update CHANGES.md

* Update CHANGES.md

* Add known issue

* Update CHANGES.md
2020-10-20 16:46:53 +01:00
Neil Alexander 39c7a8915c
Multi-personality polylith binary (#1552)
* Initial work oon multipersonality binary

* Remove old binaries

* Monolith and polylith binaries

* Better logging

* dendrite-poly-multi

* Fix path

* Copyright notices etc

* Tweaks

* Update Docker, INSTALL.md

* Take first argument if flags package doesn't find any args

* Postgres 9.6 or later, fix some more Docker stuff

* Don't create unnecessary e2ekey DB

* Run go mod tidy
2020-10-20 16:11:24 +01:00
Neil Alexander 6c3c621de0
Remove invalid state delta check (#1550) 2020-10-20 12:36:16 +01:00
Kegan Dougal 837c295c26 Linting 2020-10-20 12:29:53 +01:00
Pika 53a745f333
fix create-account (#1546) 2020-10-20 11:47:37 +01:00
Kegsay eb86e2b336
Fix sqlite locking bugs present on sytest (#1543)
* Fix sqite locking bugs present on sytest

Comments do the explaining.

* Fix deadlock in sqlite mode

Caused by starting a writer whilst within a writer

* Only complain about invalid state deltas for non-overwrite events

* Do not re-process outlier unnecessarily
2020-10-20 11:42:54 +01:00
Neil Alexander 92982a402f
Update Docker (#1542)
* Separate Docker images, rather than tags

* Allow specifying tag to build/push/pull

* Include goose in Docker builds
2020-10-20 11:34:22 +01:00
Neil Alexander a71360d099
Update INSTALL.md (#1549) 2020-10-20 11:22:46 +01:00
Till Faelligen 02a11d5a8f Only apply receipts on initial sync or if edu positions differ,
otherwise we'll be sending the same receipts over and over again.
2020-10-20 11:01:07 +02:00
Till Faelligen 3a5c8256df Use key/value directly 2020-10-20 09:23:23 +02:00
Till Faelligen 80f346d70a Remove single purpose struct 2020-10-20 09:08:20 +02:00
Till Faelligen 72c0134e99 Merge branch 'master' of https://github.com/matrix-org/dendrite into add-receipts-2 2020-10-20 08:07:11 +02:00
Till Faelligen 72f71f1466 Fix postgres query... 2020-10-20 08:05:37 +02:00
Neil Alexander c7bf122a26
Update sytest lists 2020-10-19 15:38:42 +01:00
Neil Alexander 5d80ff11a0
Update sytest-whitelist 2020-10-19 15:17:28 +01:00
Devon Johnson 45abdcaeb9
Send state after event, not current
Signed-off-by: Devon Johnson <djohnson1865@gmail.com>
2020-10-19 15:12:37 +01:00
Neil Alexander 6e63df1d9a
KindOld (#1531)
* Add KindOld

* Don't process latest events/memberships for old events

* Allow federationsender to ignore duplicate key entries when LatestEventIDs is duplicated by RS output events

* Signal to downstream components if an event has become a forward extremity

* Don't exclude from sync

* Soft-fail checks on KindNew

* Don't run the latest events updater at all for KindOld

* Don't make federation sender change after all

* Kind in federation sender join

* Don't send isForwardExtremity

* Fix syncapi

* Update comments

* Fix SendEventWithState

* Update sytest-whitelist

* Generate old output events

* Sync API consumes old room events

* Update comments
2020-10-19 14:59:13 +01:00
S7evinK 0974f6e2c0
Fix internal http api (#1535)
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
2020-10-19 09:38:10 +01:00
Till Faelligen 9e3dff34fb Remove dead code
Use key for timestamp
2020-10-18 11:30:29 +02:00
Till Faelligen 1a10566f28 - Fix a bug when creating client receipts
- Use concrete types instead of interface{}
2020-10-18 11:19:47 +02:00
Till Faelligen 247da6d862 Clarification on comment 2020-10-17 17:17:20 +02:00
Till Faelligen cbc62d176b Ensure required sequence exists before running migrations 2020-10-17 17:15:36 +02:00
Till Faelligen 722fe5a046 Add postgres migration 2020-10-17 15:15:35 +02:00