- Mar 24, 2020
-
-
Richard van der Hoff authored
* Pull Sentinel out of LoggingContext ... and drop a few unnecessary references to it * Factor out LoggingContext.current_context move `current_context` and `set_context` out to top-level functions. Mostly this means that I can more easily trace what's actually referring to LoggingContext, but I think it's generally neater. * move copy-to-parent into `stop` this really just makes `start` and `stop` more symetric. It also means that it behaves correctly if you manually `set_log_context` rather than using the context manager. * Replace `LoggingContext.alive` with `finished` Turn `alive` into `finished` and make it a bit better defined.
-
- Feb 21, 2020
-
-
Patrick Cloke authored
Ensure good comprehension hygiene using flake8-comprehensions.
-
- Jan 24, 2020
-
-
Andrew Morgan authored
-
- Jan 16, 2020
-
-
Richard van der Hoff authored
... since the whole response is huge. We even need to break up the assertions, since kibana otherwise truncates them.
-
- Dec 10, 2019
-
-
Erik Johnston authored
-
- Dec 09, 2019
-
-
Erik Johnston authored
-
- Oct 30, 2019
-
-
Erik Johnston authored
This makes it easier to use in an async/await world. Also fixes a bug where cache descriptors would occaisonally return a raw value rather than a deferred.
-
- Oct 28, 2019
-
-
Erik Johnston authored
-
- Sep 17, 2019
-
-
Richard van der Hoff authored
Track the time that a server started failing at, for general analysis purposes.
-
- Aug 13, 2019
-
-
Erik Johnston authored
This gives a bit of a grace period where we can attempt to refetch a remote `well-known`, while still using the cached result if that fails. Hopefully this will make the well-known resolution a bit more torelant of failures, rather than it immediately treating failures as "no result" and caching that for an hour.
-
- Jul 25, 2019
-
-
Richard van der Hoff authored
There was some inconsistent behaviour in the caching layer around how exceptions were handled - particularly synchronously-thrown ones. This seems to be most easily handled by pushing the creation of ObservableDeferreds down from CacheDescriptor to the Cache.
-
- Jul 23, 2019
-
-
Amber Brown authored
-
- Jul 05, 2019
-
-
Richard van der Hoff authored
- Put the default window_size back to 1000ms (broken by #5181) - Make the `rc_federation` config actually do something - fix an off-by-one error in the 'concurrent' limit - Avoid creating an unused `_PerHostRatelimiter` object for every single incoming request
-
- Jul 03, 2019
-
-
Amber Brown authored
-
- Jul 02, 2019
-
-
Amber Brown authored
-
- Jun 20, 2019
-
-
Amber Brown authored
-
- May 10, 2019
-
-
Amber Brown authored
-
- Apr 11, 2019
-
-
Andrew Morgan authored
-
- Jan 30, 2019
-
-
Richard van der Hoff authored
-
- Jan 17, 2019
-
-
Richard van der Hoff authored
-
- Sep 27, 2018
-
-
Richard van der Hoff authored
when processing incoming transactions, it can be hard to see what's going on, because we process a bunch of stuff in parallel, and because we may end up recursively working our way through a chain of three or four events. This commit creates a way to use logcontexts to add the relevant event ids to the log lines.
-
- Sep 21, 2018
-
-
Erik Johnston authored
ExpiringCache required that `start()` be called before it would actually start expiring entries. A number of places didn't do that. This PR removes `start` from ExpiringCache, and automatically starts backround reaping process on creation instead.
-
- Aug 10, 2018
-
-
black authored
-
Amber Brown authored
-
- Jul 27, 2018
-
-
Richard van der Hoff authored
-
Richard van der Hoff authored
Because it was complicated and annoyed me. I suspect this will be more efficient too.
-
- Jul 20, 2018
-
-
Richard van der Hoff authored
-
Richard van der Hoff authored
Linearizer was effectively a Limiter with max_count=1, so rather than maintaining two sets of code, let's combine them.
-
Richard van der Hoff authored
Fixes #3570
-
- Jul 17, 2018
-
-
Erik Johnston authored
-
- Jul 13, 2018
-
-
Erik Johnston authored
-
- Jul 09, 2018
-
-
Amber Brown authored
-
- Jul 04, 2018
-
-
Richard van der Hoff authored
a61738b3 removed a call to run_on_reactor from a unit test, but that call was doing something useful, in making the function in question asynchronous. Reinstate the call and add a check that we are testing what we wanted to be testing.
-
- Jun 22, 2018
-
-
Richard van der Hoff authored
When _get_state_for_groups is given a wildcard filter, just do a complete lookup. Hopefully this will give us the best of both worlds by not filling up the ram if we only need one or two keys, but also making the cache still work for the federation reader usecase.
-
Amber Brown authored
-
- Jun 14, 2018
-
-
Amber Brown authored
-
- Jun 05, 2018
-
-
Amber Brown authored
-
- May 29, 2018
-
-
Matthew Hodgson authored
-
- May 02, 2018
-
-
Richard van der Hoff authored
-
Richard van der Hoff authored
So, it turns out that if you have a first `Deferred` `D1`, you can add a callback which returns another `Deferred` `D2`, and `D2` must then complete before any further callbacks on `D1` will execute (and later callbacks on `D1` get the *result* of `D2` rather than `D2` itself). So, `D1` might have `called=True` (as in, it has started running its callbacks), but any new callbacks added to `D1` won't get run until `D2` completes - so if you `yield D1` in an `inlineCallbacks` function, your `yield` will 'block'. In conclusion: some of our assumptions in `logcontext` were invalid. We need to make sure that we don't optimise out the logcontext juggling when this situation happens. Fortunately, it is easy to detect by checking `D1.paused`.
-