summary refs log tree commit diff
path: root/synapse/util (follow)
Commit message (Collapse)AuthorAgeFilesLines
* report metrics on number of cache evictionsRichard van der Hoff2018-02-053-4/+34
|
* Add federation_domain_whitelist option (#2820)Matthew Hodgson2018-01-221-0/+12
| | | | | | Add federation_domain_whitelist gives a way to restrict which domains your HS is allowed to federate with. useful mainly for gracefully preventing a private but internet-connected HS from trying to federate to the wider public Matrix network
* Merge pull request #2813 from matrix-org/matthew/registrations_require_3pidMatthew Hodgson2018-01-221-0/+48
|\ | | | | add registrations_require_3pid and allow_local_3pids
| * fix PR nitpickingMatthew Hodgson2018-01-191-3/+6
| |
| * rewrite based on PR feedback:Matthew Hodgson2018-01-191-0/+45
| | | | | | | | | | | | | | | | | | * [ ] split config options into allowed_local_3pids and registrations_require_3pid * [ ] simplify and comment logic for picking registration flows * [ ] fix docstring and move check_3pid_allowed into a new util module * [ ] use check_3pid_allowed everywhere @erikjohnston PTAL
* | Merge pull request #2804 from matrix-org/erikj/file_consumerErik Johnston2018-01-181-0/+139
|\ \ | | | | | | Add decent impl of a FileConsumer
| * | Do logcontexts correctlyErik Johnston2018-01-181-2/+2
| | |
| * | Move test stuff to testsErik Johnston2018-01-181-25/+1
| | |
| * | Make all fields privateErik Johnston2018-01-181-31/+31
| | |
| * | Ensure we registerProducer isn't called twiceErik Johnston2018-01-181-0/+3
| | |
| * | Fix _notify_empty typoErik Johnston2018-01-181-1/+1
| | |
| * | Move definition of paused_producer to __init__Erik Johnston2018-01-181-2/+4
| | |
| * | Fix commentsErik Johnston2018-01-181-3/+3
| | |
| * | Add decent impl of a FileConsumerErik Johnston2018-01-171-0/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Twisted core doesn't have a general purpose one, so we need to write one ourselves. Features: - All writing happens in background thread - Supports both push and pull producers - Push producers get paused if the consumer falls behind
* | | Fix bugs in block metricsRichard van der Hoff2018-01-181-2/+4
| |/ |/| | | | | ... which I introduced in #2785
* | Track DB scheduling delay per-requestRichard van der Hoff2018-01-162-2/+30
| | | | | | | | | | | | For each request, track the amount of time spent waiting for a db connection. This entails adding it to the LoggingContext and we may as well add metrics for it while we are passing.
* | Track db txn time in millisecsRichard van der Hoff2018-01-162-6/+11
| | | | | | | | ... to reduce the amount of floating-point foo we do.
* | Optimise LoggingContext creation and copyingRichard van der Hoff2018-01-161-7/+18
|/ | | | | | | | It turns out that the only thing we use the __dict__ of LoggingContext for is `request`, and given we create lots of LoggingContexts and then copy them every time we do a db transaction or log line, using the __dict__ seems a bit redundant. Let's try to optimise things by making the request attribute explicit.
* Reorganise request and block metricsRichard van der Hoff2018-01-151-11/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to circumvent the number of duplicate foo:count metrics increasing without bounds, it's time for a rearrangement. The following are all deprecated, and replaced with synapse_util_metrics_block_count: synapse_util_metrics_block_timer:count synapse_util_metrics_block_ru_utime:count synapse_util_metrics_block_ru_stime:count synapse_util_metrics_block_db_txn_count:count synapse_util_metrics_block_db_txn_duration:count The following are all deprecated, and replaced with synapse_http_server_response_count: synapse_http_server_requests synapse_http_server_response_time:count synapse_http_server_response_ru_utime:count synapse_http_server_response_ru_stime:count synapse_http_server_response_db_txn_count:count synapse_http_server_response_db_txn_duration:count The following are renamed (the old metrics are kept for now, but deprecated): synapse_util_metrics_block_timer:total -> synapse_util_metrics_block_time_seconds synapse_util_metrics_block_ru_utime:total -> synapse_util_metrics_block_ru_utime_seconds synapse_util_metrics_block_ru_stime:total -> synapse_util_metrics_block_ru_stime_seconds synapse_util_metrics_block_db_txn_count:total -> synapse_util_metrics_block_db_txn_count synapse_util_metrics_block_db_txn_duration:total -> synapse_util_metrics_block_db_txn_duration_seconds synapse_http_server_response_time:total -> synapse_http_server_response_time_seconds synapse_http_server_response_ru_utime:total -> synapse_http_server_response_ru_utime_seconds synapse_http_server_response_ru_stime:total -> synapse_http_server_response_ru_stime_seconds synapse_http_server_response_db_txn_count:total -> synapse_http_server_response_db_txn_count synapse_http_server_response_db_txn_duration:total synapse_http_server_response_db_txn_duration_seconds
* Remove __PreservingContextDeferred tooRichard van der Hoff2017-11-141-30/+0
|
* Remove preserve_context_over_{fn, deferred}Richard van der Hoff2017-11-143-49/+10
| | | | | Both of these functions ae known to leak logcontexts. Replace the remaining calls to them and kill them off.
* Logging and logcontext fixes for LimiterRichard van der Hoff2017-11-071-7/+17
| | | | | | | | | Add some logging to the Limiter in a similar spirit to the Linearizer, to help debug issues. Also fix a logcontext leak. Also refactor slightly to avoid throwing exceptions.
* fix vars named `l`Richard van der Hoff2017-10-232-7/+4
| | | | E741 says "do not use variables named ‘l’, ‘O’, or ‘I’".
* replace 'except:' with 'except Exception:'Richard van der Hoff2017-10-234-11/+11
| | | | what could possibly go wrong
* Fix logcontext handling for persist_eventsRichard van der Hoff2017-10-171-0/+5
| | | | | | | | * don't use preserve_context_over_deferred, which is known broken. * remove a redundant preserve_fn. * add/improve some comments
* Merge pull request #2532 from matrix-org/rav/fix_linearizerRichard van der Hoff2017-10-111-2/+22
|\ | | | | Fix stackoverflow and logcontexts from linearizer
| * Fix stackoverflow and logcontexts from linearizerRichard van der Hoff2017-10-111-2/+22
| | | | | | | | | | | | | | 1. make it not blow out the stack when there are more than 50 things waiting for a lock. Fixes https://github.com/matrix-org/synapse/issues/2505. 2. Make it not mess up the log contexts.
* | logformatter: fix AttributeErrorRichard van der Hoff2017-10-111-3/+11
| | | | | | | | make sure we have the relevant fields before we try to log them.
* | Fancy logformatter to format exceptions betterRichard van der Hoff2017-10-091-0/+43
|/ | | | | | | | | This is a bit of an experimental change at this point; the idea is to see if it helps us track down where our stack overflows are coming from by logging the stack when the exception was caught and turned into a Failure. (We'll also need https://github.com/richvdh/twisted/commit/edf27044200e74680ea67c525768e36dc9d9af2b). If we deploy this, we'll be able to enable it via the log config yaml.
* Fix logcontext handling for concurrently_executeRichard van der Hoff2017-10-061-2/+2
| | | | Avoid preserve_context_over_deferred, which is broken.
* pep8David Baker2017-09-261-0/+1
|
* unnecessary parensDavid Baker2017-09-261-1/+1
|
* Add module_loader.pyDavid Baker2017-09-261-0/+41
|
* Increase default cache factor size.Erik Johnston2017-07-041-1/+1
|
* Define CACHE_SIZE_FACTOR onceErik Johnston2017-07-042-9/+2
|
* Use an ExpiringCache for storing registration sessionsErik Johnston2017-06-291-0/+3
| | | | | This is because pruning them was a significant performance drain on matrix.org
* Rewrite conditionalErik Johnston2017-06-091-1/+1
|
* Fix has_any_entity_changedErik Johnston2017-06-091-4/+4
| | | | | | | | Occaisonally has_any_entity_changed would throw the error: "Set changed size during iteration" when taking the max of the `sorteddict`. While its uncertain how that happens, its quite inefficient to iterate over the entire dict anyway so we change to using the more traditional `bisect_*` functions.
* Add stream change cacheErik Johnston2017-05-311-0/+15
|
* Pull out if statement from for loopErik Johnston2017-05-221-6/+14
|
* Update list cache to handle one arg caseErik Johnston2017-05-221-17/+33
| | | | | | We update the normal cache descriptors to handle caches with a single argument specially so that the key wasn't a 1-tuple. We need to update the cache list to be aware of this.
* Make get_state_groups_from_groups faster.Erik Johnston2017-05-171-11/+46
| | | | | | | | | Most of the time was spent copying a dict to filter out sentinel values that indicated that keys did not exist in the dict. The sentinel values were added to ensure that we cached the non-existence of keys. By updating DictionaryCache to keep track of which keys were known to not exist itself we can remove a dictionary copy.
* Don't update event cache hit ratio from get_joined_usersErik Johnston2017-05-081-3/+6
| | | | | Otherwise the hit ration of plain get_events gets completely skewed by calls to get_joined_users* functions.
* Optimise caches with single keyErik Johnston2017-05-041-9/+33
|
* Instantiate DeferredTimedOutError correctlyRichard van der Hoff2017-05-021-1/+1
| | | | | | Call `super` correctly, so that we correctly initialise the `errcode` field. Fixes https://github.com/matrix-org/synapse/issues/2179.
* Reduce size of joined_user cacheErik Johnston2017-04-251-0/+14
| | | | | | | | The _get_joined_users_from_context cache stores a mapping from user_id to avatar_url and display_name. Instead of storing those in a dict, store them in a namedtuple as that uses much less memory. We also try converting the string to ascii to further reduce the size.
* Remove DEBUG_CACHESErik Johnston2017-04-251-2/+0
|
* Reduce cache size by not storing deferredsErik Johnston2017-04-251-18/+21
| | | | | | | | | | | | | | | | | | | | Currently the cache descriptors store deferreds rather than raw values, this is a simple way of triggering only one database hit and sharing the result if two callers attempt to get the same value. However, there are a few caches that simply store a mapping from string to string (or int). These caches can have a large number of entries, under the assumption that each entry is small. However, the size of a deferred (specifically the size of ObservableDeferred) is signigicantly larger than that of the raw value, 2kb vs 32b. This PR therefore changes the cache descriptors to store the raw values rather than the deferreds. As a side effect cached storage function now either return a deferred or the actual value, as the cached list decriptor already does. This is fine as we always end up just yield'ing on the returned value eventually, which handles that case correctly.
* Only intern ascii stringsErik Johnston2017-04-241-18/+11
|
* Fix fixme in preserve_fnRichard van der Hoff2017-04-031-5/+1
| | | | | `preserve_fn` is no longer used as a decorator anywhere, so we can safely fix a fixme therein.
* Remove unused instance variableErik Johnston2017-03-311-4/+0
|
* DocsErik Johnston2017-03-301-0/+5
|
* Revert log context changeErik Johnston2017-03-301-3/+0
|
* Doc new instance variablesErik Johnston2017-03-301-1/+8
|
* Manually calculate cache key as getcallargs is expensiveErik Johnston2017-03-301-6/+28
| | | | | This is because getcallargs recomputes the getargspec, amongst other things, which we don't need to do as its already been done
* Don't convert to deferreds when not necessaryErik Johnston2017-03-303-2/+8
|
* Fix the logcontext handling in the cache wrappers (#2077)Richard van der Hoff2017-03-302-16/+37
| | | | | | | The cache wrappers had a habit of leaking the logcontext into the reactor while the lookup function was running, and then not restoring it correctly when the lookup function had completed. It's all the fault of `preserve_context_over_{fn,deferred}` which are basically a bit broken.
* Merge pull request #2050 from matrix-org/rav/federation_backoffRichard van der Hoff2017-03-231-4/+25
|\ | | | | push federation retry limiter down to matrixfederationclient
| * Ignore backoff history for invites, aliases, and roomdirsRichard van der Hoff2017-03-231-2/+11
| | | | | | | | | | Add a param to the federation client which lets us ignore historical backoff data for federation queries, and set it for a handful of operations.
| * push federation retry limiter down to matrixfederationclientRichard van der Hoff2017-03-231-2/+14
| | | | | | | | | | rather than having to instrument everywhere we make a federation call, make the MatrixFederationHttpClient manage the retry limiter.
* | Merge pull request #2052 from matrix-org/rav/time_bound_deferredRichard van der Hoff2017-03-231-4/+6
|\ \ | | | | | | Fix time_bound_deferred to throw the right exception
| * | Fix time_bound_deferred to throw the right exceptionRichard van der Hoff2017-03-231-4/+6
| |/ | | | | | | | | | | Due to a failure to instantiate DeferredTimedOutError, time_bound_deferred would throw a CancelledError when the deferred timed out, which was rather confusing.
* | Fix a couple of logcontext leaksRichard van der Hoff2017-03-231-2/+3
| | | | | | | | | | Use preserve_fn to correctly manage the logcontexts around things we don't want to yield on.
* | Fix caching of remote servers' signature keysRichard van der Hoff2017-03-221-63/+72
|/ | | | | | | | | The `@cached` decorator on `KeyStore._get_server_verify_key` was missing its `num_args` parameter, which meant that it was returning the wrong key for any server which had more than one recorded key. By way of a fix, change the default for `num_args` to be *all* arguments. To implement that, factor out a common base class for `CacheDescriptor` and `CacheListDescriptor`.
* Merge pull request #2026 from matrix-org/rav/logcontext_docsRichard van der Hoff2017-03-201-0/+10
|\ | | | | Logcontext docs
| * Logcontext docsRichard van der Hoff2017-03-171-0/+10
| |
* | Stop preserve_fn leaking context into the reactorRichard van der Hoff2017-03-181-32/+29
|/ | | | | | | | Fix a bug in ``logcontext.preserve_fn`` which made it leak context into the reactor, and add a test for it. Also, get rid of ``logcontext.reset_context_after_deferred``, which tried to do the same thing but had its own, different, set of bugs.
* Merge pull request #2016 from matrix-org/rav/queue_pdus_during_joinRichard van der Hoff2017-03-171-0/+25
|\ | | | | Queue up federation PDUs while a room join is in progress
| * Implement reset_context_after_deferredRichard van der Hoff2017-03-151-0/+25
| | | | | | | | | | to correctly reset the context when we fire off a deferred we aren't going to wait for.
* | Fix assertion to stop transaction queue getting wedgedRichard van der Hoff2017-03-151-1/+1
| | | | | | | | | | | | | | | | ... and update some docstrings to correctly reflect the types being used. get_new_device_msgs_for_remote can return a long under some circumstances, which was being stored in last_device_list_stream_id_by_dest, and was then upsetting things on the next loop.
* | Support registration / login with phone numberDavid Baker2017-03-131-0/+40
|/ | | | Changes from https://github.com/matrix-org/synapse/pull/1971
* Revert "Support registration & login with phone number"Erik Johnston2017-03-131-40/+0
|
* Add setdefault key to ExpiringCacheErik Johnston2017-03-101-0/+7
|
* DocsDavid Baker2017-03-081-0/+13
|
* Incorrectly copied copyrightDavid Baker2017-03-081-1/+0
| | | | This file post-dates OM
* pep8David Baker2017-03-081-0/+1
|
* Add msisdn util fileDavid Baker2017-03-081-0/+27
|
* CommentErik Johnston2017-02-021-1/+4
|
* CommentErik Johnston2017-02-021-0/+2
|
* Correctly raise exceptions for ratelimitng. Ratelimit on 401Erik Johnston2017-02-011-3/+5
|
* Remove explicit < 400 check as apparently this is confusingErik Johnston2017-01-311-3/+1
|
* CommentErik Johnston2017-01-311-0/+2
|
* CommentErik Johnston2017-01-311-0/+4
|
* Better handle 404 response for federation /send/Erik Johnston2017-01-311-2/+13
|
* Update LruCache size estimate on clearErik Johnston2017-01-181-0/+2
|
* Measure metrics of string_cacheErik Johnston2017-01-171-3/+8
|
* Fix typo in return typeErik Johnston2017-01-171-3/+2
|
* Rename and comment tree_to_leaves_iteratorErik Johnston2017-01-172-5/+8
|
* Remove needless call to evict()Erik Johnston2017-01-171-1/+0
|
* Speed up cache size calculationErik Johnston2017-01-175-46/+128
| | | | | | | | | | | Instead of calculating the size of the cache repeatedly, which can take a long time now that it can use a callback, instead cache the size and update that on insertion and deletion. This requires changing the cache descriptors to have two caches, one for pending deferreds and the other for the actual values. There's no reason to evict from the pending deferreds as they won't take up any more memory.
* Use OrderedDict in ExpiringCacheErik Johnston2017-01-161-10/+4
|
* Add support for 'iterable' to ExpiringCacheErik Johnston2017-01-161-9/+17
|
* Optionally measure size of cache by sum of length of valuesErik Johnston2017-01-132-19/+38
|
* Remove full_twisted_stacktraces optionErik Johnston2017-01-121-71/+0
| | | | | | | | | | | | | | | | | The debug 'full_twisted_stacktraces' flag caused synapse to rewrite twisted deferreds to always fire the callback on the next reactor tick. This was to force the deferred to always store the stacktraces on exceptions, and thus be more likely to have a full stacktrace when it reaches the final error handlers and gets printed to the logs. Dynamically rewriting things is generally bad, and in particular this change violates assumptions of various bits of Twisted. This wouldn't necessarily be so bad, but it turns out this option has been turned on on some production servers. Turning the option can cause e.g. #1778. For now, lets just entirely nuke this option.
* Add paranoia exception catch in LinearizerErik Johnston2017-01-101-2/+5
|
* More logging for the linearizer and for get_eventsMark Haines2017-01-051-2/+11
|
* s/aquire/acquire/gMark Haines2016-12-301-1/+1
|
* Add more useful logging when we block fetching eventsMark Haines2016-12-301-0/+5
|
* Merge pull request #1620 from matrix-org/erikj/concurrent_room_accessErik Johnston2016-12-121-0/+58
|\ | | | | Limit the number of events that can be created on a given room concurrently
| * CommentsErik Johnston2016-11-111-0/+13
| |
| * Add Limiter: limit concurrent access to resourceErik Johnston2016-11-101-0/+45
| |
* | Correctly handle timeout errorsErik Johnston2016-12-091-1/+6
| |
* | Use correct varErik Johnston2016-11-241-1/+1
| |
* | Correctly handle 500's and 429 on federationErik Johnston2016-11-241-1/+1
| |
* | Invalidate retry cache in both directionsErik Johnston2016-11-221-9/+12
| |
* | Handle sending events and device messages over federationErik Johnston2016-11-171-3/+14
| |
* | Use external ldap auth pacakgeErik Johnston2016-11-151-369/+0
| |
* | Clean transactions based on time. Add HttpTransactionCache tests.Kegan Dougal2016-11-141-1/+9
|/
* Explicitly set authentication mode in ldap3Erik Johnston2016-11-081-1/+2
| | | | | | This only makes a difference for versions of ldap3 before 1.0, but a) its best to be explicit and b) there are distributions that package ancient versions for ldap3 (e.g. debian).
* Implement pluggable password authErik Johnston2016-10-031-0/+368
| | | | | | Allows delegating the password auth to an external module. This also moves the LDAP auth to using this system, allowing it to be removed from the synapse tree entirely in the future.
* Change get_pos_of_last_change to return upper boundErik Johnston2016-09-151-3/+4
|
* Use stream_change cache to make get_forward_extremeties_for_room cache more ↵Erik Johnston2016-09-151-0/+5
| | | | effective
* Fix up push to use get_current_state_idsErik Johnston2016-08-251-176/+0
|
* Preserve some logcontextsErik Johnston2016-08-242-8/+16
|
* Merge pull request #1031 from matrix-org/erikj/measure_notifierErik Johnston2016-08-221-1/+1
|\ | | | | Add more Measure blocks
| * Only abort Measure on ExceptionsErik Johnston2016-08-191-1/+1
| |
* | Ensure invalidation list does not grow unboundedlyErik Johnston2016-08-192-20/+16
| |
* | Rename to on_invalidateErik Johnston2016-08-191-16/+10
| |
* | Make cache_context an explicit optionErik Johnston2016-08-191-8/+27
| |
* | Remove lru optionErik Johnston2016-08-191-23/+8
| |
* | Add concept of cache contextsErik Johnston2016-08-193-20/+99
|/
* Clean up TransactionQueueErik Johnston2016-08-102-3/+1
|
* Measure federation send transaction resourcesErik Johnston2016-08-101-0/+14
|
* Add federation /version APIErik Johnston2016-08-051-4/+4
|
* Merge pull request #940 from matrix-org/erikj/fed_state_cacheErik Johnston2016-08-021-2/+11
|\ | | | | Cache federation state responses
| * Cache federation state responsesErik Johnston2016-07-211-2/+11
| |
* | Fix retry utils to check if the exception is a subclass of CMEMark Haines2016-07-281-1/+1
| |
* | Don't include name of room for invites in pushDavid Baker2016-07-281-1/+4
| | | | | | | | Avoids insane pushes like, "Bob invited you to invite from Bob"
* | typoMatthew Hodgson2016-07-261-1/+1
|/
* Add ReadWriteLockErik Johnston2016-07-051-0/+82
|
* Use similar naming we use in email notifs for pushDavid Baker2016-06-241-1/+4
| | | | Fixes https://github.com/vector-im/vector-web/issues/1654
* Remove registered_users from the distributor.Mark Haines2016-06-171-4/+0
| | | | | | | | | | The only place that was observed was to set the profile. I've made it so that the profile is set within store.register in the same transaction that creates the user. This required some slight changes to the registration code for upgrading guest users, since it previously relied on the distributor swallowing errors if the profile already existed.
* Merge branch 'erikj/cache_perf' of github.com:matrix-org/synapse into developErik Johnston2016-06-032-10/+34
|\
| * Pull out update_results_dictErik Johnston2016-06-031-8/+7
| |
| * Small optimisation to CacheListDescriptorErik Johnston2016-06-032-2/+11
| |
| * Make cachedList go a bit fasterErik Johnston2016-06-031-10/+34
| |
* | Change CacheMetrics to be quickerErik Johnston2016-06-035-25/+44
|/ | | | | | We change it so that each cache has an individual CacheMetric, instead of having one global CacheMetric. This means that when a cache tries to increment a counter it does not need to go through so many indirections.
* catch thinko in presentable namesMatthew Hodgson2016-05-231-4/+15
|
* DocstringDavid Baker2016-04-291-0/+14
|
* pep8 newlineDavid Baker2016-04-291-1/+1
|
* Merge remote-tracking branch 'origin/develop' into dbkr/email_notifsDavid Baker2016-04-292-0/+168
|\
| * Add a metrics listener and a ssh listener to the pusherMark Haines2016-04-251-1/+25
| |
| * Move the listenTCP call outside the manhole functionMark Haines2016-04-251-9/+5
| |
| * Split out setting up the manhole to a separate fileMark Haines2016-04-221-0/+50
| |
| * Split out create_resource_tree to a separate fileMark Haines2016-04-221-0/+98
| |
* | Handle room invites in email notifsDavid Baker2016-04-281-3/+3
| |
* | More variable calculation for email notifsDavid Baker2016-04-251-16/+19
| | | | | | | | Include name of the person we're sending to and add summary text at the top giving an overview of what's happened.
* | TypoDavid Baker2016-04-251-1/+1
| |
* | No we don't: it's just the display nameDavid Baker2016-04-221-1/+0
| |
* | Sort member eventsDavid Baker2016-04-221-0/+4
| | | | | | | | So names of people in a room are given in order
* | Implement group-of-people namesDavid Baker2016-04-221-17/+14
| |
* | Flesh out email templatingDavid Baker2016-04-211-0/+142
|/ | | | Mostly WIP porting the room name calculation logic from the web client so our room names in the email mirror the clients.
* Create log context in Measure if one doesn't existErik Johnston2016-04-181-6/+17
|
* Use SynapseError 504 for Timeout errorsErik Johnston2016-04-151-1/+2
|
* Move the versionstring code out of app.homeserver into utilMark Haines2016-04-112-0/+121
|
* Remove some unused functions (#711)Mark Haines2016-04-083-21/+0
| | | | | | | | * Remove some unused functions * get_room_events_stream is only used in tests * is_exclusive_room might actually be something we want
* Move all the wrapper functions for distributor.fireMark Haines2016-04-081-1/+21
| | | | | | | Move the functions inside the distributor and import them where needed. This reduces duplication and makes it possible for flake8 to detect when the functions aren't used in a given file.
* Rename thingsErik Johnston2016-04-071-5/+5
|
* Log contexts and squash things togetherErik Johnston2016-04-071-17/+15
|
* Add commentErik Johnston2016-04-071-0/+8
|
* Deduplicate joinsErik Johnston2016-04-072-1/+43
|
* Make the cache objects be per instance rather than being globalMark Haines2016-04-061-21/+24
|
* CommentErik Johnston2016-04-011-1/+1
|
* Add concurrently_execute functionErik Johnston2016-04-011-1/+31
|
* Fix typoMark Haines2016-03-241-1/+1
|
* Deduplicate identical /sync requestsMark Haines2016-03-241-0/+46
|
* Simplify intern_dictErik Johnston2016-03-231-17/+10
|
* Intern all the thingsErik Johnston2016-03-231-1/+57
|
* String internErik Johnston2016-03-231-0/+8
|
* Make LruCache use a dedicated _Node classErik Johnston2016-03-221-32/+41
|
* Return list, not generator.Erik Johnston2016-03-141-3/+1
|
* Use syntax that works on both py2.7 and py3Mark Haines2016-03-071-1/+1
|
* Limit stream change cache size tooErik Johnston2016-03-011-1/+5
|
* Move cache size fiddling to descriptors only. Fix testsErik Johnston2016-03-011-2/+2
|
* Add enviroment variable SYNAPSE_CACHE_FACTOR, default it to 0.1Erik Johnston2016-03-011-0/+6
|
* Reraise exceptionErik Johnston2016-03-011-0/+1
|
* Correct cache miss detectionErik Johnston2016-03-011-1/+1
|
* Report size of ExpiringCacheErik Johnston2016-02-231-2/+13
|
* Change the way we figure out presence updates for small deltasErik Johnston2016-02-231-0/+16
|
* Add presence metricsErik Johnston2016-02-191-0/+6
|
* WheelTimer: Don't scan list, use index.Erik Johnston2016-02-181-5/+8
|
* Initial cutErik Johnston2016-02-171-1/+1
|
* Add wheeltimer implErik Johnston2016-02-171-0/+88
|
* Merge pull request #566 from matrix-org/erikj/logcontextErik Johnston2016-02-101-16/+13
|\ | | | | Don't bother copying records on parent context
| * Remove commentErik Johnston2016-02-101-1/+1
| |
| * s/parent_context/previous_context/Erik Johnston2016-02-101-9/+9
| |
| * Set parent context on instansiationErik Johnston2016-02-101-2/+7
| |
| * Don't bother copying records on parent contextErik Johnston2016-02-091-8/+0
| |
* | Fix unit testsErik Johnston2016-02-091-4/+5
| |
* | Don't create new logging contextErik Johnston2016-02-091-12/+15
|/
* Fix bug in util.metrics.MeasureErik Johnston2016-02-091-1/+3
|
* Create new context when measuringErik Johnston2016-02-091-2/+5
|
* Change logcontext warns to debugErik Johnston2016-02-091-3/+3
|
* Fix up logcontextsErik Johnston2016-02-089-28/+169
|
* Add metrics to pushersErik Johnston2016-02-081-0/+86
|
* Allowing tagging log contextsErik Johnston2016-02-031-1/+6
|
* Fix flake8 warnings for new flake8Daniel Wagner-Hall2016-02-026-7/+7
|
* If stream pos is greater then earliest known key and entity hasn't changed, ↵Erik Johnston2016-01-291-8/+3
| | | | then entity hasn't changed
* Prefill stream change cachesErik Johnston2016-01-291-1/+4
|
* Merge pull request #536 from matrix-org/erikj/syncErik Johnston2016-01-291-0/+107
|\ | | | | Make /sync "better".
| * If the same as the earliest key, assume nothing has changed.Erik Johnston2016-01-281-0/+5
| |
| * Correctly update _entity_to_keyErik Johnston2016-01-281-4/+5
| |
| * Fix inequalitiesErik Johnston2016-01-281-2/+2
| |
| * Include cache hits with has_entity_changedErik Johnston2016-01-281-0/+4
| |
| * Change name and doc has_entity_changedErik Johnston2016-01-281-1/+3
| |
| * Cache tags and account dataErik Johnston2016-01-282-92/+95
| |
| * Ensure keys to RoomStreamChangeCache are intsErik Johnston2016-01-281-0/+6
| |
| * Invalidate caches properly. Remove unused argErik Johnston2016-01-281-2/+2
| |
| * Add cache to room streamErik Johnston2016-01-271-0/+86
| |
* | Directly set self.valueErik Johnston2016-01-291-1/+1
| |
* | Remove spurious self.sizeErik Johnston2016-01-291-1/+0
| |
* | Correctly bookkeep the size of TreeCacheErik Johnston2016-01-291-3/+28
| |
* | Make TreeCache keep track of its own size.Erik Johnston2016-01-292-6/+10
| |
* | Reset size on clearErik Johnston2016-01-291-0/+2
|/
* Don't add the member functiopn if we're not using treecacheDavid Baker2016-01-221-1/+4
|
* docsDavid Baker2016-01-221-1/+5
|
* Revert all the bits changing keys of eeverything that used LRUCaches to tuplesDavid Baker2016-01-222-6/+6
|
* Make LRU cache not default to treecache & add options to use itDavid Baker2016-01-222-10/+19
|
* Add __contains__David Baker2016-01-221-0/+3
|
* Docs for treecacheDavid Baker2016-01-221-0/+5
|
* Add invalidate_many here tooDavid Baker2016-01-221-0/+1
|
* peppateDavid Baker2016-01-211-2/+2
|
* Change LRUCache to be tree-based so we can delete subtrees.David Baker2016-01-214-14/+102
|
* copyrightsMatthew Hodgson2016-01-0717-17/+17
|
* Add some docstring explaining the snapshot cache doesMark Haines2015-12-231-1/+23
|
* Add a unit test for the snapshot cacheMark Haines2015-12-231-2/+2
|
* Add a cache for initialSync responses that expires after 5 minutesMark Haines2015-12-221-0/+71
|
* Track the time spent in the database per request.Mark Haines2015-12-071-0/+9
| | | | and track the number of transactions that request started.
* Add a setter for the current log context.Mark Haines2015-12-071-16/+24
| | | | | | Move the resource tracking inside that setter so that it is easier to make sure that the resource tracking isn't double counting the resource usage.
* Add comments to explain why we are hardcoding RUSAGE_THREADMark Haines2015-12-041-0/+8
|
* Fix warningsMark Haines2015-12-041-2/+2
|
* Track the cpu used in the main thread by each logging contextMark Haines2015-12-033-10/+72
|
* Run the background updates when starting synapse.Mark Haines2015-11-101-0/+8
|
* Exchange 3pid invites for m.room.member invitesDaniel Wagner-Hall2015-11-051-69/+0
|
* Merge pull request #340 from matrix-org/erikj/server_retriesErik Johnston2015-11-051-2/+5
|\ | | | | Retry dead servers a lot less often
| * Retry dead servers a lot less oftenErik Johnston2015-11-021-2/+5
| |
* | Remove the LockManager class because it wasn't being usedMark Haines2015-11-041-74/+0
|/
* Merge pull request #312 from matrix-org/daniel/3pidinvitesDaniel Wagner-Hall2015-10-191-1/+1
|\ | | | | Stuff signed data in a standalone object
| * Stuff signed data in a standalone objectDaniel Wagner-Hall2015-10-161-1/+1
| | | | | | | | | | Makes both generating it in sydent, and verifying it here, simpler at the cost of some repetition
* | Merge pull request #306 from matrix-org/markjh/unused_methodsMark Haines2015-10-161-71/+0
|\ \ | |/ |/| Remove some login classes from synapse.
| * synapse.util.emailutils was unusedMark Haines2015-10-151-71/+0
| |
* | Add signing host and keyname to signaturesDaniel Wagner-Hall2015-10-161-1/+1
| |
* | Verify third party ID server certificatesDaniel Wagner-Hall2015-10-161-3/+3
| |
* | Look for keys on the right objectsDaniel Wagner-Hall2015-10-151-1/+1
| |
* | Merge branch 'develop' into daniel/3pidinvitesDaniel Wagner-Hall2015-10-151-0/+72
|\|
| * Fix pep8 warnings.Mark Haines2015-10-131-8/+12
| |
| * Bounce all deferreds through the reactor to make debugging easier.Mark Haines2015-10-131-0/+68
| | | | | | | | | | | | If all deferreds wait a reactor tick before resolving then there is always a chance to add an errback to the deferred so that stacktraces get reported, rather than being discarded.
* | Use more descriptive error codeDaniel Wagner-Hall2015-10-131-1/+1
| |
* | Remove unnecessary class-wrappingDaniel Wagner-Hall2015-10-132-68/+69
| |
* | Move event contents into third_party_layout fieldDaniel Wagner-Hall2015-10-131-2/+8
| |