Kegsay
9d9e854fe0
Add Queryer and Inputer and factor out more RSAPI stuff ( #1382 )
...
* Add Queryer and use embedded structs
* Add Inputer and factor out more RS API stuff
This neatly splits up the RS API based on the functionality it provides,
whilst providing a useful place for code sharing via the `helpers` package.
2020-09-02 17:13:15 +01:00
Neil Alexander
f06637435b
Fix #1381 ( #1384 )
2020-09-02 16:52:06 +01:00
Neil Alexander
3b0774805c
Version imprint ( #1383 )
...
* Versions
* Update build.sh
2020-09-02 16:18:08 +01:00
Neil Alexander
096191ca24
Use federation sender for backfill/getting missing events ( #1379 )
...
* Use federation sender for backfill and getting missing events
* Fix internal URL paths
* Update go.mod/go.sum for matrix-org/gomatrixserverlib#218
* Add missing server implementations in HTTP interface
2020-09-02 15:26:30 +01:00
Kegsay
e473320e73
Refactor roomserver/internal - split perform stuff out ( #1380 )
...
- New package `perform` which contains all `Perform` functions
- New package `helpers` which contains helper functions used by both
perform and query/input functions.
- Perform invite/leave have no idea how to `WriteOutputEvents` and this
is now returned from `PerformInvite` or `PerformLeave` respectively.
Still to do:
- RSAPI is fed into the inviter/joiner/leaver - this introduces circular
logic so will need to be removed.
- Put query operations in a `query` package.
- Put input operations (and output) in an `input` package.
- Factor out helper functions as much as possible, possibly rejigging the
storage layer in the process.
2020-09-02 13:47:31 +01:00
Matthew Hodgson
f6af656945
re-add accidentally deleted field
2020-09-02 10:08:10 +01:00
Matthew Hodgson
b6cc4417cc
re-add txn to SelectPeeks
2020-09-02 10:07:49 +01:00
Kegsay
02a73f29f8
Expand RoomInfo to cover more DB storage functions ( #1377 )
...
* Factor more things to RoomInfo
* Factor out remaining bits for RoomInfo
* Linting for now
2020-09-02 10:02:48 +01:00
Matthew Hodgson
75b91ac9e5
strip out empty roomd deltas
2020-09-01 21:59:35 +01:00
Matthew Hodgson
85bce11964
don't log ascii in binary at sql trace...
2020-09-01 21:59:11 +01:00
Matthew Hodgson
6424117852
use exclusive writer, and MarkPeeksAsOld more efficiently
2020-09-01 21:31:04 +01:00
Matthew Hodgson
5d7f688fa7
wrap peek storage in goid hack
2020-09-01 21:30:03 +01:00
Kegsay
82a9617659
Put redactions/filters in the writer goroutine ( #1378 )
...
* Put redactions in the writer goroutine
* Update filters on writer goroutine
2020-09-01 20:35:38 +01:00
Matthew Hodgson
3cebd8dbfb
Merge branch 'kegan/HACK-goid-sqlite-db-is-locked' into matthew/peeking
2020-09-01 21:37:22 +03:00
Matthew Hodgson
ed4b3a58a7
Merge branch 'kegan/redact-txn' into matthew/peeking
2020-09-01 21:34:01 +03:00
Kegan Dougal
6410b702ce
Update filters on writer goroutine
2020-09-01 19:27:21 +01:00
Kegan Dougal
fcdb90c91b
Put redactions in the writer goroutine
2020-09-01 19:21:33 +01:00
Kegan Dougal
7bf2a27319
Track partition offsets and only log unsafe for non-selects
2020-09-01 19:17:01 +01:00
Kegan Dougal
bfecc8e0e9
HACK: Track goroutine IDs to determine when we write by the wrong thread
...
To use: set `DENDRITE_TRACE_SQL=1` then grep for `unsafe`
2020-09-01 19:10:57 +01:00
Matthew Hodgson
d0d5f70105
Merge branch 'master' into matthew/peeking
2020-09-01 19:11:51 +03:00
Neil Alexander
a9f4d83d30
Fix duplicate writers ( #1376 )
...
* Fix writers
* Don't use writers in both shared and sqlite3
2020-09-01 16:58:21 +01:00
Neil Alexander
89c772fb78
Report which component failed to consume ( #1375 )
2020-09-01 16:53:38 +01:00
Matthew Hodgson
86e9736ca3
fix s/join/peek/ cargocult fail
2020-09-01 18:04:55 +03:00
Matthew Hodgson
28219c66f5
Merge branch 'master' into matthew/peeking
2020-09-01 18:03:06 +03:00
Kegsay
6d79f04354
Add RoomInfo metadata struct ( #1367 )
...
* Add RoomInfo struct
* Remove RoomNID and replace with RoomInfo
* Bugfix and remove another needless query
* nil guard
2020-09-01 12:40:49 +01:00
Neil Alexander
0ab5bccd11
Storage tweaks ( #1373 )
...
* Sync API tweaks
* User API tweaks
2020-09-01 11:28:35 +01:00
Rohit Mohan
3f9b829bc5
Public room client API changes ( #1368 )
...
Signed-off-by: Rohit Mohan <rohitmohan96@gmail.com>
2020-09-01 10:26:34 +01:00
Neil Alexander
b0d2b39739
Remove unused SyncStreamPosition
2020-09-01 10:26:02 +01:00
Neil Alexander
f7b2a5866e
Update dependencies ( #1372 )
...
* Other updates
* Update naffka
* naffka not indirect
* Revert quic-go
2020-09-01 10:20:31 +01:00
Matthew Hodgson
0bb2c2c418
remove unnecessary txn for SelectPeeks
2020-09-01 00:24:23 +03:00
Matthew Hodgson
e5899843ea
fix SQL
2020-08-31 23:28:55 +03:00
Matthew Hodgson
7b38d4857f
spell out how to runoutside of docker if you want speed
2020-08-31 23:28:46 +03:00
Matthew Hodgson
6c3a896910
cancel any peeks when we join a room
2020-08-31 18:58:10 +03:00
Matthew Hodgson
f006b37bf0
add peeking to getResponseWithPDUsForCompleteSync
2020-08-31 18:16:07 +03:00
Matthew Hodgson
d1e4d66126
make it launch
2020-08-31 17:35:23 +03:00
Matthew Hodgson
c4e5f60d71
make it build
2020-08-31 16:12:09 +03:00
Matthew Hodgson
d343b8fb2c
blind stab at adding a peek
section to /sync
2020-08-31 15:28:31 +03:00
Matthew Hodgson
9b79f9a883
add server_name param
2020-08-31 12:27:39 +03:00
Matthew Hodgson
cfa0be544d
merge master
2020-08-31 12:26:27 +03:00
Matthew Hodgson
d7bdf71bef
make PeekingDeviceSet private
2020-08-30 17:56:49 +03:00
Matthew Hodgson
b9342d9ee2
a very very WIP first cut of peeking via MSC2753.
...
doesn't yet compile or work.
needs to actually add the peeking block into the sync response.
checking in now before it gets any bigger, and to gather any initial feedback on the vague shape of it.
2020-08-30 17:46:15 +03:00
Neil Alexander
737802fc06
Update Complement dockerfile to not wait for apt-get input
2020-08-28 15:19:47 +01:00
Neil Alexander
c42c70597c
Add some error wrapping to sync API, use background context for sync ( #1363 )
...
* Add some error wrapping to sync API
* Don't use request context for BeginTx until mattn/go-sqlite3#764 is fixed
2020-08-28 13:28:40 +01:00
Neil Alexander
fee1c22790
Fix #1361 ( #1362 )
2020-08-28 09:46:32 +01:00
Kegsay
9af2f5f1f2
Remove device DB from clientapi ( #1352 )
...
* Remove device DB from clientapi
* Remove device DB from startup configuration
It's all an impl detail now in user API
2020-08-27 18:53:40 +01:00
Neil Alexander
c0f28845f8
Try to protect GetNextTransactionPDUs ( #1350 )
2020-08-27 15:27:12 +01:00
Neil Alexander
034e5d5a55
Speed up accepting invites from remote users if we're already in the room ( #1349 )
2020-08-27 11:47:13 +01:00
Neil Alexander
7466e6b718
Fix lock errors in federation sender ( #1347 )
...
* Fix lock errors in federation sender
* Additional fix to writers
2020-08-27 11:05:41 +01:00
Kegsay
421b6b2313
Add OpenTracing documentation ( #1345 )
...
* Add OpenTracing documentation
Closes #274
* Reshuffle
* Update setup.md
2020-08-27 10:24:56 +01:00
Neil Alexander
42183bef50
Allow join to accept server_name in query parameters ( #1346 )
2020-08-26 18:23:08 +01:00