- Nov 04, 2021
-
-
Richard van der Hoff authored
I was trying to understand how `cachedList` works, and ended up writing this extra test. I figure we may as well keep it.
-
- Nov 02, 2021
-
-
Richard van der Hoff authored
-
- Sep 23, 2021
-
-
Patrick Cloke authored
-
- Jul 13, 2021
-
-
Jonathan de Jong authored
This PR is tantamount to running: python3.8 -m com2ann -v 6 tests/ (com2ann requires python 3.8 to run)
-
- Jul 05, 2021
-
-
Erik Johnston authored
-
- Jun 14, 2021
-
-
Richard van der Hoff authored
This is the first of two PRs which seek to address #8518. This first PR lays the groundwork by extending ResponseCache; a second PR (#10158) will update the SyncHandler to actually use it, and fix the bug. The idea here is that we allow the callback given to ResponseCache.wrap to decide whether its result should be cached or not. We do that by (optionally) passing a ResponseCacheContext into it, which it can modify.
-
- Jun 02, 2021
-
-
Erik Johnston authored
-
- May 27, 2021
-
-
Erik Johnston authored
Fixes #10068
-
Richard van der Hoff authored
* Make `invalidate` and `invalidate_many` do the same thing ... so that we can do either over the invalidation replication stream, and also because they always confused me a bit. * Kill off `invalidate_many` * changelog
-
- May 24, 2021
-
-
Patrick Cloke authored
-
Richard van der Hoff authored
`keylen` seems to be a thing that is frequently incorrectly set, and we don't really need it. The only time it was used was to figure out if we had removed a subtree in `del_multi`, which we can do better by changing `TreeCache.pop` to return a different type (`TreeCacheNode`). Commits should be independently reviewable.
-
- May 21, 2021
-
-
Erik Johnston authored
-
Erik Johnston authored
-
- May 14, 2021
-
-
Richard van der Hoff authored
- use a tuple rather than a list for the iterable that is passed into the wrapped function, for performance - test that we can pass an iterable and that keys are correctly deduped.
-
- May 12, 2021
-
-
Richard van der Hoff authored
-
- May 11, 2021
-
-
Richard van der Hoff authored
* tests for push rule pattern matching * tests for acl pattern matching * factor out common `re.escape` * Factor out common re.compile * Factor out common anchoring code * add word_boundary support to `glob_to_regex` * Use `glob_to_regex` in push rule evaluator NB that this drops support for character classes. I don't think anyone ever used them. * Improve efficiency of globs with multiple wildcards The idea here is that we compress multiple `*` globs into a single `.*`. We also need to consider `?`, since `*?*` is as hard to implement efficiently as `**`. * add assertion on regex pattern * Fix mypy * Simplify glob_to_regex * Inline the glob_to_regex helper function Signed-off-by:
Dan Callahan <danc@element.io> * Moar comments Signed-off-by:
Dan Callahan <danc@element.io> Co-authored-by:
Dan Callahan <danc@element.io>
-
- Apr 20, 2021
-
-
Patrick Cloke authored
As far as I can tell our logging contexts are meant to log the request ID, or sometimes the request ID followed by a suffix (this is generally stored in the name field of LoggingContext). There's also code to log the name@memory location, but I'm not sure this is ever used. This simplifies the code paths to require every logging context to have a name and use that in logging. For sub-contexts (created via nested_logging_contexts, defer_to_threadpool, Measure) we use the current context's str (which becomes their name or the string "sentinel") and then potentially modify that (e.g. add a suffix).
-
- Apr 14, 2021
-
-
Jonathan de Jong authored
Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by:
Jonathan de Jong <jonathan@automatia.nl>`>
-
- Apr 09, 2021
-
-
Patrick Cloke authored
-
- Apr 08, 2021
-
-
Jonathan de Jong authored
Part of #9366 Adds in fixes for B006 and B008, both relating to mutable parameter lint errors. Signed-off-by:
Jonathan de Jong <jonathan@automatia.nl>
-
Patrick Cloke authored
Records additional request information into the structured logs, e.g. the requester, IP address, etc.
-
- Mar 29, 2021
-
-
Patrick Cloke authored
-
- Mar 08, 2021
-
-
Jonathan de Jong authored
-
- Feb 16, 2021
-
-
Eric Eastwood authored
- Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version
-
Richard van der Hoff authored
Ensure that we lock correctly to prevent multiple concurrent metadata load requests, and generally clean up the way we construct the metadata cache.
-
- Jan 22, 2021
-
-
Erik Johnston authored
-
- Jan 14, 2021
-
-
Erik Johnston authored
We passed in a graph to `sorted_topologically` which didn't have an entry for each node (as we dropped nodes with no edges).
-
- Jan 11, 2021
-
-
Erik Johnston authored
-
- Jan 06, 2021
-
-
Patrick Cloke authored
-
- Oct 30, 2020
-
-
Richard van der Hoff authored
We don't always need the full power of a DeferredCache.
-
- Oct 21, 2020
-
-
Richard van der Hoff authored
-
Richard van der Hoff authored
-
Richard van der Hoff authored
-
- Oct 19, 2020
-
-
Richard van der Hoff authored
We need to make sure we are readu for the `set_cache_factor` callback.
-
Richard van der Hoff authored
* Add `DeferredCache.get_immediate` method A bunch of things that are currently calling `DeferredCache.get` are only really interested in the result if it's completed. We can optimise and simplify this case. * Remove unused 'default' parameter to DeferredCache.get() * another get_immediate instance
-
- Oct 16, 2020
-
-
Richard van der Hoff authored
rather than have everything that instantiates an LruCache manage metrics separately, have LruCache do it itself.
-
- Oct 14, 2020
-
-
Richard van der Hoff authored
-
Richard van der Hoff authored
-
Richard van der Hoff authored
-
- Sep 04, 2020
-
-
Patrick Cloke authored
-