Commit Graph

10815 Commits

Author SHA1 Message Date
Erik Johnston
50fe92cd26 Move presence handling into handle_new_client_event
As we want to have it run on the main synapse instance
2018-02-07 10:34:09 +00:00
Erik Johnston
8ec2e638be Add event_creator worker 2018-02-07 10:32:32 +00:00
Erik Johnston
24dd73028a Add replication http endpoint for event sending 2018-02-07 10:32:32 +00:00
Erik Johnston
e3624fad5f Remove pointless ratelimit check
The intention was for the check to be called as early as possible in the
request, but actually was called just before the main ratelimit check,
so was fairly pointless.
2018-02-07 10:30:25 +00:00
Erik Johnston
617199d73d
Merge pull request #2847 from matrix-org/erikj/separate_event_creation
Split event creation into a separate handler
2018-02-06 17:01:17 +00:00
Erik Johnston
3e1e69ccaf Update copyright 2018-02-06 16:40:38 +00:00
Erik Johnston
770b2252ca s/_create_new_client_event/create_new_client_event/ 2018-02-06 16:40:30 +00:00
Erik Johnston
3d33eef6fc
Store state groups separately from events (#2784)
* Split state group persist into seperate storage func

* Add per database engine code for state group id gen

* Move store_state_group to StateReadStore

This allows other workers to use it, and so resolve state.

* Hook up store_state_group

* Fix tests

* Rename _store_mult_state_groups_txn

* Rename StateGroupReadStore

* Remove redundant _have_persisted_state_group_txn

* Update comments

* Comment compute_event_context

* Set start val for state_group_id_seq

... otherwise we try to recreate old state groups

* Update comments

* Don't store state for outliers

* Update comment

* Update docstring as state groups are ints
2018-02-06 14:31:24 +00:00
kaiyou
1ffd9cb936 Support loading application service files from /data/appservices/ 2018-02-05 23:13:27 +01:00
kaiyou
107a5c9441 Add the non-tls port to the expose list 2018-02-05 23:02:33 +01:00
kaiyou
ee3b160a2a Only generate configuration files when necessary 2018-02-05 22:57:35 +01:00
kaiyou
630573a932 Do not copy documentation files to the Docker root folder 2018-02-05 22:57:22 +01:00
kaiyou
f5364b47ec Point to the 'latest' tag in the Docker documentation 2018-02-05 22:14:40 +01:00
kaiyou
d8c7da5dca Fix a typo in the Docker README 2018-02-05 22:12:50 +01:00
kaiyou
cf4ef60e28 Document the cache factor environment variable for Docker 2018-02-05 22:10:03 +01:00
kaiyou
cd51931b62 Add dynamic TURN configuration in the Docker image 2018-02-05 21:53:53 +01:00
kaiyou
81010a126e Add dynamic recaptcha configuration in the Docker image 2018-02-05 21:28:15 +01:00
kaiyou
8db84e9b21 Remove docker related files from the python manifest 2018-02-05 20:08:35 +01:00
Richard van der Hoff
b31bf0bb51
Merge pull request #2849 from matrix-org/rav/clean_up_state_delta
Remove redundant return value from _calculate_state_delta
2018-02-05 17:42:20 +01:00
Richard van der Hoff
9a304ef2b0
Merge pull request #2848 from matrix-org/rav/refactor_search_insert
Factor out common code for search insert
2018-02-05 17:42:09 +01:00
Richard van der Hoff
ebfe64e3d6 Use StateResolutionHandler to resolve state in persist events
... and thus benefit (hopefully) from its cache.
2018-02-05 16:23:26 +00:00
Richard van der Hoff
225dc3b4cb Flatten _get_new_state_after_events
rejig the if statements to simplify the logic and reduce indentation
2018-02-05 16:23:25 +00:00
Richard van der Hoff
9fcbbe8e7d Check that events being persisted have state_group 2018-02-05 16:23:25 +00:00
Richard van der Hoff
447aed42d2 Add event_map param to resolve_state_groups 2018-02-05 16:23:25 +00:00
Richard van der Hoff
ee6fb4cf85 Remove redundant return value from _calculate_state_delta
we already have the state from _get_new_state_after_events, so returning it
from _calculate_state_delta is just confusing.
2018-02-05 16:23:20 +00:00
Richard van der Hoff
3c7b480ba3 Factor out common code for search insert
we can reuse the same code as is used for event insert, for doing the
background index population.
2018-02-05 16:12:14 +00:00
Erik Johnston
25c0a020f4 Updates tests 2018-02-05 16:01:48 +00:00
Erik Johnston
3fa362502c Update places where we create events 2018-02-05 16:01:48 +00:00
Erik Johnston
5ff3d23564 Split event creation into a separate handler 2018-02-05 16:01:48 +00:00
Richard van der Hoff
c46e75d3d8 Move store_event_search_txn to SearchStore
... as a precursor to making event storing and doing the bg update share some
code.
2018-02-05 15:43:22 +00:00
Richard van der Hoff
db91e72ade
Merge pull request #2844 from matrix-org/rav/evicted_metrics
montoring metrics for number of cache evictions
2018-02-05 16:34:36 +01:00
Richard van der Hoff
bc496df192 report metrics on number of cache evictions 2018-02-05 15:34:01 +00:00
Erik Johnston
a1beca0e25 Fix broken unit test for media storage 2018-02-05 12:44:03 +00:00
Erik Johnston
b5049d2e5c Add .vscode to gitignore 2018-02-05 12:06:46 +00:00
Erik Johnston
1f881e0746
Merge pull request #2791 from matrix-org/erikj/media_storage_refactor
Ensure media is in local cache before thumbnailing
2018-02-05 11:28:52 +00:00
kaiyou
e9021e16c4 Run the server as an unprivileged user 2018-02-04 23:19:08 +01:00
kaiyou
f72c9c1fb6 Fix multiple typos 2018-02-04 16:18:40 +01:00
kaiyou
b8ab78b82c Add the build cache/ folder to gitignore 2018-02-04 15:41:54 +01:00
kaiyou
9a87b8aaf7 Update sumperdump Docker readme to match this image properties 2018-02-04 15:27:32 +01:00
kaiyou
84a9209ba7 Remove etc/service files from rob's branch 2018-02-04 15:08:43 +01:00
kaiyou
53965334da Merge remote-tracking branch 'origin/rob/docker' into feat-dockerfile 2018-02-04 15:08:19 +01:00
kaiyou
a207cccb05 Reuse environment variables of the postgres container 2018-02-04 15:04:26 +01:00
kaiyou
1ba2fe114c Provide an example docker compose file 2018-02-04 12:55:20 +01:00
kaiyou
042757feb2 Install the postgres dependencies 2018-02-04 12:28:42 +01:00
kaiyou
886c2d5019 Support an external postgresql config in the Docker image 2018-02-04 12:20:29 +01:00
kaiyou
f2bf0cda02 Generate shared secrets if not defined in the environment 2018-02-04 11:40:20 +01:00
kaiyou
6d1e28a842 Generate any missing keys before starting synapse 2018-02-04 11:14:06 +01:00
kaiyou
48bc22f89d Allow for a wheel cache and include missing files in the build 2018-02-04 10:58:07 +01:00
Richard van der Hoff
80b8a28100 Factor out common code for search insert
we can reuse the same code as is used for event insert, for doing the
background index population.
2018-02-04 00:23:06 +00:00
Richard van der Hoff
bd25f9cf36 Clean up work_mem handling
Add some comments and improve exception handling when twiddling work_mem for
the search update
2018-02-03 23:05:41 +00:00