Commit Graph

3707 Commits (e664e9737ca8ff04043f747a9375ff50440352c2)

Author SHA1 Message Date
Erik Johnston 3e2fcd67b2 Don't bother copying records on parent context 2016-02-09 10:50:31 +00:00
Erik Johnston 241b71852e Fix bug in util.metrics.Measure 2016-02-09 10:28:13 +00:00
Erik Johnston 97294ef2fd Create new context when measuring 2016-02-09 10:12:00 +00:00
Erik Johnston 549698b1e0 Don't measure across event stream call, as it lasts for a long time. 2016-02-09 09:37:09 +00:00
Erik Johnston c486b7b41c Change logcontext warns to debug 2016-02-09 09:20:38 +00:00
Erik Johnston 2bb5f035af Merge pull request #564 from matrix-org/erikj/logcontext
Fix up logcontexts
2016-02-08 15:16:16 +00:00
Erik Johnston cca5c06679 Merge pull request #562 from matrix-org/erikj/push_metric
Add metrics to pushers
2016-02-08 14:57:40 +00:00
Erik Johnston 2c1fbea531 Fix up logcontexts 2016-02-08 14:26:45 +00:00
Erik Johnston 13e6262659 Add metrics to pushers 2016-02-08 14:26:45 +00:00
Daniel Wagner-Hall 1d19a5ec0f Reject additional path segments 2016-02-08 10:50:55 +00:00
Daniel Wagner-Hall 79a1c0574b Allocate guest user IDs numericcally
The current random IDs are ugly and confusing when presented in UIs.
This makes them prettier and easier to read.

Also, disable non-automated registration of numeric IDs so that we don't
need to worry so much about people carving out our automated address
space and us needing to keep retrying ID registration.
2016-02-05 11:22:30 +00:00
Daniel Wagner-Hall 737c4223ef Host /media/r0 as well as /media/v1 2016-02-05 10:47:46 +00:00
Daniel Wagner-Hall 6a9f1209df Error if macaroon key is missing from config
Currently we store all access tokens in the DB, and fall back to that
check if we can't validate the macaroon, so our fallback works here, but
for guests, their macaroons don't get persisted, so we don't get to
find them in the database. Each restart, we generate a new ephemeral
key, so guests lose access after each server restart.

I tried to fix up the config stuff to be less insane, but gave up, so
instead I bolt on yet another piece of custom one-off insanity.

Also, add some basic tests for config generation and loading.
2016-02-05 01:58:23 +00:00
David Baker 34dda7cc7f Merge pull request #557 from matrix-org/dbkr/profile_dont_return_null
Omit keys rather then returning null in profile API
2016-02-04 15:39:12 +00:00
Erik Johnston 4d36e73230 Actually return something sensible 2016-02-03 16:35:00 +00:00
Erik Johnston 709e09e1c3 Remove old log line 2016-02-03 16:32:20 +00:00
Erik Johnston aa4af94c69 We return dicts now. 2016-02-03 16:29:32 +00:00
Erik Johnston b84d59c5f0 Add descriptions 2016-02-03 16:22:35 +00:00
Erik Johnston 33c71c3a4b Preserve log context over when deferring to thread pool in media repo 2016-02-03 16:17:18 +00:00
Erik Johnston c8e4d5de7f Merge pull request #555 from matrix-org/erikj/logcontext
Allowing tagging log contexts
2016-02-03 15:20:00 +00:00
David Baker 156cea5b45 No braces here 2016-02-03 15:04:51 +00:00
Erik Johnston 8450114098 Merge pull request #554 from matrix-org/erikj/event_push
Change event_push_actions_rm_tokens schema
2016-02-03 15:02:47 +00:00
David Baker 24277fbb97 Don't return null if profile display name / avatar url isn't set: omit them instead 2016-02-03 14:59:19 +00:00
Daniel Wagner-Hall 66bb255fcd Merge pull request #556 from matrix-org/daniel/config
Rename config field to reflect yaml name
2016-02-03 14:55:54 +00:00
Daniel Wagner-Hall 5054806ec1 Rename config field to reflect yaml name 2016-02-03 14:42:01 +00:00
Erik Johnston d4f72a5bfb Allowing tagging log contexts 2016-02-03 13:52:27 +00:00
Erik Johnston f8aae79a72 Simplify get_rooms 2016-02-03 13:24:35 +00:00
Erik Johnston 9cd80a7b5c PEP8 2016-02-03 11:52:57 +00:00
Erik Johnston 772b45c745 Remove unused method 2016-02-03 11:43:26 +00:00
Erik Johnston 6f52e90065 Merge branch 'develop' of github.com:matrix-org/synapse into erikj/public_room_fix 2016-02-03 11:06:29 +00:00
Erik Johnston 771528ab13 Change event_push_actions_rm_tokens schema 2016-02-03 10:50:49 +00:00
Erik Johnston b32121a5d1 Unused import 2016-02-03 10:30:56 +00:00
Daniel Wagner-Hall 2df6114bc4 Log more diagnostics for unrecognised access tokens 2016-02-02 19:21:49 +00:00
Daniel Wagner-Hall d83d004ccd Fix flake8 warnings for new flake8 2016-02-02 17:18:50 +00:00
Erik Johnston 8a391e33ae s/get_room_changes_for_user/get_membership_changes_for_user/ 2016-02-02 16:12:10 +00:00
Erik Johnston 477b1ed6cf Fetch events in a separate transaction.
This has a couple of benefits:

- It reduces the time of transactions, allowing other database requests
  to run.
- Fetching events is given a dedicated database thread, and so can't
  starve other database requests.
2016-02-02 15:58:14 +00:00
Erik Johnston 04ad93e6fd Merge pull request #545 from matrix-org/erikj/sync
Move /sync state calculations from rest to handler
2016-02-02 15:28:43 +00:00
Erik Johnston 65e92eca49 Change the way we do public room list fetching 2016-02-02 15:21:10 +00:00
David Baker 69214ea671 Pass make_guest whne we autogen a user ID 2016-02-02 14:42:31 +00:00
Erik Johnston b023995538 WARN if we get a topo token instead of stream. 2016-02-02 14:11:14 +00:00
David Baker 793369791a Merge pull request #547 from matrix-org/dbkr/fix_guest_upgrade
Pull guest access token out of the auth session params
2016-02-02 09:47:30 +00:00
Erik Johnston 854ca32f10 Comments 2016-02-01 16:52:27 +00:00
David Baker d7ac861d3b Pull guest access token out of the auth session params, otherwise it will break if you open the email on a different device. 2016-02-01 16:33:19 +00:00
Erik Johnston 89b40b225c Order things correctly 2016-02-01 16:32:46 +00:00
Erik Johnston 4bf448be25 Switch over /events to use per room caches 2016-02-01 16:26:51 +00:00
Erik Johnston fa48020a52 Move state calculations from rest to handler 2016-02-01 15:59:40 +00:00
Erik Johnston 2d3837bec7 Merge pull request #543 from matrix-org/erikj/sync
Cache get_room_changes_for_user
2016-02-01 15:05:06 +00:00
Erik Johnston ceb6b8680a Only use room_ids if in get_room_events_stream if is_guest 2016-02-01 10:33:52 +00:00
Erik Johnston d98a9f2583 Don't use before_token. Its wrong. Use actual limit. 2016-01-31 13:31:15 +00:00
Erik Johnston 25c311eaf6 Cache get_room_changes_for_user 2016-01-29 16:52:48 +00:00