Erik Johnston
f2a48d87df
Use get_cache_factor_for function for `state_cache`
...
This allows the cache factor for `state_cache` to be individually
specified in the enviroment
2018-08-20 13:01:46 +01:00
Erik Johnston
2aa7cc6a46
Merge pull request #3713 from matrix-org/erikj/fixup_fed_logging
...
Fix logging bug in EDU handling over replication
2018-08-20 10:51:45 +01:00
Neil Johnson
e07970165f
rename error code
2018-08-18 14:39:45 +01:00
Neil Johnson
c5171bf171
special case server_notices_mxid
2018-08-18 12:33:07 +01:00
Neil Johnson
ba1fbf7d5b
special case server_notices_mxid
2018-08-18 12:31:08 +01:00
Richard van der Hoff
3cef867cc1
Merge pull request #3709 from matrix-org/rav/logcontext_for_replication_commands
...
Logcontexts for replication command handlers
2018-08-17 16:22:07 +01:00
Richard van der Hoff
c144252a8c
Merge pull request #3710 from matrix-org/rav/logcontext_for_pusher_updates
...
Fix logcontexts for running pushers
2018-08-17 16:21:49 +01:00
Amber Brown
c334ca67bb
Integrate presence from hotfixes ( #3694 )
2018-08-18 01:08:45 +10:00
Amber Brown
04f5d2db62
Remove v1/register's broken shared secret functionality ( #3703 )
2018-08-18 00:55:01 +10:00
Erik Johnston
ab822a2d1f
Add some fixmes
2018-08-17 15:31:50 +01:00
Erik Johnston
91cdb6de08
Call UserDirectoryHandler methods directly
...
Turns out that the user directory handling is fairly racey as a bunch
of stuff assumes that the processing happens on master, which it doesn't
when there is a synapse.app.user_dir worker. So lets just call the
function directly until we actually get round to fixing it, since it
doesn't make the situation any worse.
2018-08-17 15:26:13 +01:00
Neil Johnson
d49b77404b
clean up, no functional changes
2018-08-17 15:21:34 +01:00
Richard van der Hoff
63260397c6
Merge pull request #3701 from matrix-org/rav/use_producer_for_responses
...
Use a producer to stream back responses
2018-08-17 14:58:45 +01:00
Richard van der Hoff
3f8709ffe4
Merge pull request #3700 from matrix-org/rav/wait_for_producers
...
Refactor request logging code
2018-08-17 14:57:45 +01:00
Neil Johnson
3ee57bdcbb
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/server_notices_on_blocking
2018-08-17 14:34:10 +01:00
Erik Johnston
782689bd40
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/split_profiles
2018-08-17 14:15:48 +01:00
Erik Johnston
ca87ad1def
Split ProfileHandler into master and worker
2018-08-17 14:15:14 +01:00
Neil Johnson
b5f638f1f4
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/server_notices_on_blocking
2018-08-17 14:04:15 +01:00
Neil Johnson
9fd161c6fb
Merge branch 'neilj/limit_exceeded_error' of github.com:matrix-org/synapse into neilj/limit_exceeded_error
2018-08-17 13:58:40 +01:00
Neil Johnson
0195dfbf52
server limits config docs
2018-08-17 13:58:25 +01:00
Neil Johnson
69c49d3fa3
Merge branch 'develop' into neilj/limit_exceeded_error
2018-08-17 12:44:26 +00:00
Erik Johnston
38f708a2bb
Remote profile cache should remain in master worker
2018-08-17 11:37:42 +01:00
Erik Johnston
3b2dcfff78
Fix logging bug in EDU handling over replication
2018-08-17 11:11:06 +01:00
Neil Johnson
521d369e7a
remove errant yield
2018-08-17 10:12:11 +01:00
Richard van der Hoff
0e8d78f6aa
Logcontexts for replication command handlers
...
Run the handlers for replication commands as background processes. This should
improve the visibility in our metrics, and reduce the number of "running db
transaction from sentinel context" warnings.
Ideally it means converting the things that fire off deferreds into the night
into things that actually return a Deferred when they are done. I've made a bit
of a stab at this, but it will probably be leaky.
2018-08-17 00:43:43 +01:00
Richard van der Hoff
66f7dc8c87
Fix logcontexts for running pushers
...
First of all, avoid resetting the logcontext before running the pushers, to fix
the "Starting db txn 'get_all_updated_receipts' from sentinel context" warning.
Instead, give them their own "background process" logcontexts.
2018-08-17 00:32:39 +01:00
Neil Johnson
bcfeb44afe
call reap on start up and fix under reaping bug
2018-08-16 22:55:32 +01:00
Neil Johnson
372bf073c1
block event creation and room creation on hitting resource limits
2018-08-16 21:25:16 +01:00
Neil Johnson
13ad9930c8
add new error type ResourceLimit
2018-08-16 18:02:02 +01:00
Neil Johnson
51b17ec566
flake8
2018-08-16 17:32:22 +01:00
Neil Johnson
3c1080b6e4
refactor for readability, and reuse caching for setting tags
2018-08-16 17:02:04 +01:00
Neil Johnson
eff3ae3b9a
add room tagging
2018-08-16 15:48:34 +01:00
Erik Johnston
7d5b1a60a3
Fix inbound federation on reader worker
...
Inbound federation requires calculating push, which in turn relies on
having access to account data.
2018-08-16 15:32:20 +01:00
Neil Johnson
bfb6c58624
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/server_notices_on_blocking
2018-08-16 15:10:16 +01:00
Neil Johnson
a675f9c556
check for room state before deciding on action
2018-08-16 14:53:35 +01:00
Will Hunt
c151b32b1d
Add GET media/v1/config ( #3184 )
2018-08-16 14:23:38 +01:00
Matthew Hodgson
762a758fea
lazyload aware /messages ( #3589 )
2018-08-16 14:22:47 +01:00
Neil Johnson
25d2b5d55f
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/server_notices_on_blocking
2018-08-16 11:37:17 +01:00
Neil Johnson
df1e4f259f
WIP impl commiting to get feedback
2018-08-16 11:10:53 +01:00
Neil Johnson
c055c91655
fix case where empty string state check is evaulated as False
2018-08-16 11:10:19 +01:00
Matthew Hodgson
3f543dc021
initial cut at a room summary API ( #3574 )
2018-08-16 09:46:50 +01:00
Neil Johnson
8cfad2e686
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/server_notices_on_blocking
2018-08-15 17:20:38 +01:00
Neil Johnson
81d727efa9
Merge pull request #3689 from matrix-org/neilj/fix_off_by_1+maus
...
Fix Mau off by one errors
2018-08-15 16:19:41 +00:00
Matthew Hodgson
2f78f432c4
speed up /members and add at= and membership params ( #3568 )
2018-08-15 16:35:22 +01:00
Neil Johnson
fc5d937550
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/server_notices_on_blocking
2018-08-15 16:31:40 +01:00
Neil Johnson
86a00e05e1
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/fix_off_by_1+maus
2018-08-15 16:27:08 +01:00
Neil Johnson
eabc5f8271
wip cut at sending resource server notices
2018-08-15 15:04:52 +01:00
Neil Johnson
c24fc9797b
add new event types
2018-08-15 15:04:30 +01:00
Richard van der Hoff
afcd655ab6
Use a producer to stream back responses
...
The problem with dumping all of the json response into the Request object at
once is that doing so starts the timeout for the next request to be received:
so if it takes longer than 60s to stream back the response to the client, the
client never gets it.
The correct solution is to use a Producer; then the timeout is only started
once all of the content is sent over the TCP connection.
2018-08-15 15:04:16 +01:00
Erik Johnston
dc56c47dc0
Merge pull request #3653 from matrix-org/erikj/split_federation
...
Move more federation APIs to workers
2018-08-15 14:59:02 +01:00
Neil Johnson
4601129c44
Merge pull request #3687 from matrix-org/neilj/admin_email
...
support admin_email config and pass through into blocking errors,
2018-08-15 13:52:25 +00:00
Erik Johnston
ef184caf30
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/split_federation
2018-08-15 14:25:46 +01:00
Erik Johnston
488ffe6fdb
Use federation handler function rather than duplicate
...
This involves renaming _persist_events to be a public function.
2018-08-15 14:17:18 +01:00
Erik Johnston
773db62a22
Rename slave TransactionStore to SlaveTransactionStore
2018-08-15 14:17:06 +01:00
Richard van der Hoff
eaaa2248ff
Refactor request logging code
...
This commit moves a bunch of the logic for deciding when to log the receipt and
completion of HTTP requests into SynapseRequest, rather than in the request
handling wrappers.
Advantages of this are:
* we get logs for *all* requests (including OPTIONS and HEADs), rather than
just those that end up hitting handlers we've remembered to decorate
correctly.
* when a request handler wires up a Producer (as the media stuff does
currently, and as other things will do soon), we log at the point that all
of the traffic has been sent to the client.
2018-08-15 13:47:52 +01:00
Neil Johnson
87a824bad1
clean up AuthError
2018-08-15 11:58:03 +01:00
Neil Johnson
c4eb97518f
Merge branch 'neilj/update_limits_error_codes' of github.com:matrix-org/synapse into neilj/admin_email
2018-08-15 11:53:01 +01:00
Neil Johnson
55afba0fc5
update admin email to uri
2018-08-15 11:41:18 +01:00
Neil Johnson
1c5e690a6b
Merge pull request #3690 from matrix-org/neilj/change_prometheus_mau_metric_name
...
combine mau metrics into one group
2018-08-15 09:53:59 +00:00
Erik Johnston
fef2e65d12
Merge pull request #3667 from matrix-org/erikj/fixup_unbind
...
Don't fail requests to unbind 3pids for non supporting ID servers
2018-08-15 10:32:12 +01:00
Neil Johnson
b8429c7c81
update error codes for resource limiting
2018-08-15 10:19:48 +01:00
Neil Johnson
ab035bdeac
replace admin_email with admin_uri for greater flexibility
2018-08-15 10:16:41 +01:00
Neil Johnson
19b433e3f4
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/admin_email
2018-08-14 17:44:46 +01:00
Neil Johnson
b586b8b986
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/fix_off_by_1+maus
2018-08-14 17:43:22 +01:00
Neil Johnson
70e48cbbb1
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/change_prometheus_mau_metric_name
2018-08-14 17:40:59 +01:00
Neil Johnson
9ecbaf8ba8
adding missing yield
2018-08-14 16:55:28 +01:00
Neil Johnson
e5962f845c
pep8
2018-08-14 16:36:14 +01:00
Neil Johnson
e7d091fb86
combine mau metrics into one group
2018-08-14 16:26:55 +01:00
Neil Johnson
414d54b61a
Merge pull request #3670 from matrix-org/neilj/mau_sync_block
...
Block ability to read via sync if mau limit exceeded
2018-08-14 15:21:31 +00:00
Neil Johnson
2545993ce4
make comments clearer
2018-08-14 15:48:12 +01:00
Neil Johnson
8f9a7eb58d
support admin_email config and pass through into blocking errors, return AuthError in all cases
2018-08-14 15:11:54 +01:00
Neil Johnson
c74c71128d
remove blank line
2018-08-14 15:06:24 +01:00
Neil Johnson
ed4bc3d2fc
fix off by 1s on mau
2018-08-14 15:04:48 +01:00
Neil Johnson
bd92c8eaa7
Merge branch 'neilj/admin_email' of github.com:matrix-org/synapse into neilj/fix_off_by_1+maus
2018-08-14 14:56:45 +01:00
Neil Johnson
99ebaed8e6
Update register.py
...
remove comments
2018-08-14 14:55:55 +01:00
Neil Johnson
9b5bf3d858
Merge branch 'neilj/admin_email' of github.com:matrix-org/synapse into neilj/fix_off_by_1+maus
2018-08-14 14:51:38 +01:00
Neil Johnson
e25d87d97b
Merge branch 'neilj/mau_sync_block' of github.com:matrix-org/synapse into neilj/fix_off_by_1+maus
2018-08-14 14:32:18 +01:00
Neil Johnson
e2c9fe0a6a
backout ability to pass in event type to server notices
2018-08-14 13:32:56 +01:00
Amber Brown
591bf87c6a
Merge remote-tracking branch 'origin/develop' into neilj/fix_reap_users_in_postgres
2018-08-14 20:56:23 +10:00
Neil Johnson
9b75c78b4d
support server notice state events for resource limits
2018-08-14 11:20:41 +01:00
Neil Johnson
63417c31e9
fix typo
2018-08-13 22:36:52 +01:00
Neil Johnson
f4b49152e2
support admin_email config and pass through into blocking errors, return AuthError in all cases
2018-08-13 21:09:47 +01:00
Richard van der Hoff
50bcaf1a27
Merge pull request #3677 from andrewshadura/master
...
Use recaptcha_ajax.js directly from Google
2018-08-13 18:52:56 +01:00
Richard van der Hoff
34f51babc5
Revert "Use recaptcha_ajax.js directly from Google"
2018-08-13 18:48:03 +01:00
Neil Johnson
ce7de9ae6b
Revert "support admin_email config and pass through into blocking errors, return AuthError in all cases"
...
This reverts commit 0d43f991a1
.
2018-08-13 18:06:18 +01:00
Neil Johnson
0d43f991a1
support admin_email config and pass through into blocking errors, return AuthError in all cases
2018-08-13 18:00:23 +01:00
Amber Brown
99dd975dae
Run tests under PostgreSQL ( #3423 )
2018-08-13 16:47:46 +10:00
Neil Johnson
31fa743567
fix sqlite/postgres incompatibility in reap_monthly_active_users
2018-08-11 22:38:34 +01:00
Neil Johnson
6c6aba76e1
implementation of server notices to alert on hitting resource limits
2018-08-10 15:12:59 +01:00
Richard van der Hoff
c31793a784
Merge branch 'rav/fix_linearizer_cancellation' into develop
2018-08-10 14:57:27 +01:00
Richard van der Hoff
c08f9d95b2
log *after* reloading log config
...
... because logging *before* reloading means the log message gets lost in the old MemoryLogger
2018-08-10 14:56:48 +01:00
Amber Brown
b37c472419
Rename async to async_helpers because `async` is a keyword on Python 3.7 ( #3678 )
2018-08-10 23:50:21 +10:00
Andrej Shadura
c75b71a397
Use recaptcha_ajax.js directly from Google
...
The script recaptcha_ajax.js contains minified non-free code which
we probably cannot redistribute. Since it talks to Google servers
anyway, it is better to just download it from Google directly instead
of shipping it.
This fixes #1932 .
2018-08-10 13:36:14 +02:00
Richard van der Hoff
3c0213a217
Merge pull request #3439 from vojeroen/send_sni_for_federation_requests
...
send SNI for federation requests
2018-08-10 12:23:54 +01:00
Richard van der Hoff
638d35ef08
Fix linearizer cancellation on twisted < 18.7
...
Turns out that cancellation of inlineDeferreds didn't really work properly
until Twisted 18.7. This commit refactors Linearizer.queue to avoid
inlineCallbacks.
2018-08-10 10:59:09 +01:00
Neil Johnson
01021c812f
wip at implementing MSC 7075
2018-08-09 22:16:00 +01:00
Jeroen
2e9c73e8ca
more generic conversion of str/bytes to unicode
2018-08-09 21:31:26 +02:00
Jeroen
64899341dc
include private functions from twisted
2018-08-09 21:04:22 +02:00
Neil Johnson
885ea9c602
rename _user_last_seen_monthly_active
2018-08-09 18:02:12 +01:00
Neil Johnson
c1f9dec92a
fix errant parenthesis
2018-08-09 17:43:26 +01:00