Charlotte's custom fork of the Dendrite matrix homeserver
Find a file
Kegsay 5caae6f3a0
sqlite: fixes from sytest (#872)
* bugfix: fix panic on new invite events from sytest

I'm unsure why the previous code didn't work, but it's
clearer, quicker and easier to read the `LastInsertID()` way.
Previously, the code would panic as the SELECT would fail
to find the last inserted row ID.

* sqlite: Fix UNIQUE violations and close more cursors

- Add missing `defer rows.Close()`
- Do not have the state block NID as a PRIMARY KEY else it breaks for blocks
  with >1 state event in them. Instead, rejig the queries so we can still
  have monotonically increasing integers without using AUTOINCREMENT (which
  mandates PRIMARY KEY).

* sqlite: Add missing variadic function

* Use LastInsertId because empirically it works over the SELECT form (though I don't know why that is)

* sqlite: Fix invite table by using the global stream pos rather than one specific to invites

If we don't use the global, clients don't get notified about any invites
because the position is too low.

* linting: shadowing

* sqlite: do not use last rowid, we already know the stream pos!

* sqlite: Fix account data table in syncapi by commiting insert txns!

* sqlite: Fix failing federation invite

Was failing with 'database is locked' due to multiple write txns
being taken out.

* sqlite: Ensure we return exactly the number of events found in the database

Previously we would return exactly the number of *requested* events, which
meant that several zero-initialised events would bubble through the system,
failing at JSON serialisation time.

* sqlite: let's just ignore the problem for now....

* linting
2020-02-20 09:28:03 +00:00
.github Add SyTest support to CI (#704) 2019-05-24 15:00:03 +01:00
appservice More SQLite (#871) 2020-02-14 14:12:33 +00:00
clientapi sqlite: fixes from sytest (#872) 2020-02-20 09:28:03 +00:00
cmd Support sqlite in addition to postgres (#869) 2020-02-13 17:27:33 +00:00
common Support sqlite in addition to postgres (#869) 2020-02-13 17:27:33 +00:00
docker Support sqlite in addition to postgres (#869) 2020-02-13 17:27:33 +00:00
docs Adding sslmode: disable to sytest server config (#813) 2020-02-11 13:53:00 +00:00
federationapi Support sqlite in addition to postgres (#869) 2020-02-13 17:27:33 +00:00
federationsender Support sqlite in addition to postgres (#869) 2020-02-13 17:27:33 +00:00
hooks run commit hook on what we're committing (#356) 2017-11-27 12:19:04 +00:00
mediaapi More SQLite (#871) 2020-02-14 14:12:33 +00:00
publicroomsapi More SQLite (#871) 2020-02-14 14:12:33 +00:00
roomserver sqlite: fixes from sytest (#872) 2020-02-20 09:28:03 +00:00
scripts Move files back if linting fails (#810) 2019-12-25 18:14:58 +00:00
syncapi sqlite: fixes from sytest (#872) 2020-02-20 09:28:03 +00:00
typingserver Lots of small typo fixes (#737) 2019-07-12 16:43:01 +01:00
.editorconfig Add .editorconfig (#179) 2017-08-05 02:25:40 +01:00
.gitignore use go module for dependencies (#594) 2019-05-21 21:56:55 +01:00
.golangci.yml Fix pipeline, emoji and syntax (#713) 2019-06-19 14:05:03 +01:00
build.sh make cmd directory path absolute in build.sh (#830) 2020-01-09 13:36:39 +00:00
CODE_STYLE.md replaced gometalinter description with golangci-lint (#837) 2019-12-25 18:28:10 +00:00
CONTRIBUTING.md Update documentation for Go 1.13 (#867) 2020-02-06 11:54:26 +00:00
dendrite-config.yaml Remove riot.im from the list of trusted ID servers in the default config (#688) 2019-01-31 10:06:11 +00:00
DESIGN.md Clean up README a bit (#289) 2017-10-10 09:33:41 +01:00
go.mod Support sqlite in addition to postgres (#869) 2020-02-13 17:27:33 +00:00
go.sum Support sqlite in addition to postgres (#869) 2020-02-13 17:27:33 +00:00
INSTALL.md Update documentation for Go 1.13 (#867) 2020-02-06 11:54:26 +00:00
LICENSE Add Apache Version 2.0 license and headers to all golang files 2017-04-21 00:40:52 +02:00
README.md Update documentation for Go 1.13 (#867) 2020-02-06 11:54:26 +00:00
show-expected-fail-tests.sh Add whitelist/blacklist maintenance complainer to buildkite annotations (#870) 2020-02-14 13:07:14 +00:00
sytest-blacklist Implement missing device management features (#835) 2020-02-11 12:13:38 +00:00
sytest-whitelist Add whitelist/blacklist maintenance complainer to buildkite annotations (#870) 2020-02-14 13:07:14 +00:00
WIRING.md Document internal APIs and Application Services component (#499) 2018-07-06 02:33:53 -07:00

Dendrite Build Status Dendrite Dev on Matrix Dendrite on Matrix

Dendrite will be a second-generation Matrix homeserver written in Go.

It's still very much a work in progress, but installation instructions can be found in INSTALL.md. It is not recommended to use Dendrite as a production homeserver at this time.

An overview of the design can be found in DESIGN.md.

Contributing

Everyone is welcome to help out and contribute! See CONTRIBUTING.md to get started!

Please note that, as of February 2020, Dendrite now only targets Go 1.13 or later. Please ensure that you are using at least Go 1.13 when developing for Dendrite.

Discussion

For questions about Dendrite we have a dedicated room on Matrix #dendrite:matrix.org. Development discussion should happen in #dendrite-dev:matrix.org.

Progress

There's plenty still to do to make Dendrite usable! We're tracking progress in a project board.