- Nov 16, 2021
-
-
Patrick Cloke authored
-
- Nov 15, 2021
-
-
Andrew Morgan authored
Co-authored-by:
Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
-
David Robertson authored
It already seems to pass mypy. I wonder what changed, given that it was on the exclusion list. So this commit consists of me ensuring `--disallow-untyped-defs` passes and a minor fixup to a function that returned either `True` or `None`.
-
- Nov 12, 2021
-
-
Shay authored
* change display names/avatar URLS to None if they contain null bytes * add changelog * add POC test, requested changes * add a saner test and remove old one * update test to verify that display name has been changed to None * make test less fragile
-
- Nov 09, 2021
-
-
Patrick Cloke authored
Adds experimental support for `relation_types` and `relation_senders` fields for filters.
-
- Nov 05, 2021
-
-
Erik Johnston authored
Fixes #11252
-
- Nov 02, 2021
-
-
Dirk Klimpel authored
-
- Nov 01, 2021
-
-
Sean Quah authored
-
- Oct 27, 2021
-
-
Dirk Klimpel authored
Fixes: #9346
-
- Oct 15, 2021
-
-
David Robertson authored
Co-authored-by:
Patrick Cloke <clokep@users.noreply.github.com>
-
- Oct 13, 2021
-
-
David Robertson authored
The following scenarios would halt the user directory updater: - user joins room - user leaves room - user present in room which switches from private to public, or vice versa. for two classes of users: - appservice senders - users missing from the user table. If this happened, the user directory would be stuck, unable to make forward progress. Exclude both cases from the user directory, so that we ignore them. Co-authored-by:
Eric Eastwood <erice@element.io> Co-authored-by:
reivilibre <oliverw@matrix.org> Co-authored-by:
Sean Quah <8349537+squahtx@users.noreply.github.com> Co-authored-by:
Brendan Abolivier <babolivier@matrix.org>
-
- Oct 12, 2021
-
-
Sean Quah authored
Make `get_last_client_by_ip` return the same dictionary structure regardless of whether the data has been persisted to the database. This change will allow slightly cleaner type hints to be applied later on.
-
reivilibre authored
-
- Oct 06, 2021
-
-
Patrick Cloke authored
This removes the magic allowing accessing configurable variables directly from the config object. It is now required that a specific configuration class is used (e.g. `config.foo` must be replaced with `config.server.foo`).
-
David Robertson authored
Fix a long-standing bug where a batch of user directory changes would be silently dropped if the server left a room early in the batch. * Pull out `wait_for_background_update` in tests Co-authored-by:
Patrick Cloke <clokep@users.noreply.github.com> Co-authored-by:
Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
-
- Oct 05, 2021
-
-
David Robertson authored
There are two steps to rebuilding the user directory: 1. a scan over rooms, followed by 2. a scan over local users. The former reads avatars and display names from the `room_memberships` table and therefore contains potentially private avatars and display names. The latter reads from the the `profiles` table which only contains public data; moreover it will overwrite any private profiles that the rooms scan may have written to the user directory. This means that the rebuild could leak private user while the rebuild was in progress, only to later cover up the leaks once the rebuild had completed. This change skips over local users when writing user_directory rows when scanning rooms. Doing so means that it'll take longer for a rebuild to make local users searchable, which is unfortunate. I think a future PR can improve this by swapping the order of the two steps above. (And indeed there's more to do here, e.g. copying from `profiles` without going via Python.) Small tidy-ups while I'm here: * Remove duplicated code from test_initial. This was meant to be pulled into `purge_and_rebuild_user_dir`. * Move `is_public` before updating sharing tables. No functional change; it's still before the first read of `is_public`. * Don't bother creating a set from dict keys. Slightly nicer and makes the code simpler. Co-authored-by:
Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
-
- Oct 04, 2021
-
-
David Robertson authored
* Introduce `should_include_local_users_in_dir` We exclude three kinds of local users from the user_directory tables. At present we don't consistently exclude all three in the same places. This commit introduces a new function to gather those exclusion conditions together. Because we have to handle local and remote users in different ways, I've made that function only consider the case of remote users. It's the caller's responsibility to make the local versus remote distinction clear and correct. A test fixup is required. The test now hits a path which makes db queries against the users table. The expected rows were missing, because we were using a dummy user that hadn't actually been registered. We also add new test cases to covert the exclusion logic. ---- By my reading this makes these changes: * When an app service user registers or changes their profile, they will _not_ be added to the user directory. (Previously only support and deactivated users were excluded). This is consistent with the logic that rebuilds the user directory. See also [the discussion here](https://github.com/matrix-org/synapse/pull/10914#discussion_r716859548 ). * When rebuilding the directory, exclude support and disabled users from room sharing tables. Previously only appservice users were excluded. * Exclude all three categories of local users when rebuilding the directory. Previously `_populate_user_directory_process_users` didn't do any exclusion. Co-authored-by:
Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
-
- Oct 01, 2021
-
-
Sean Quah authored
-
- Sep 30, 2021
-
-
David Robertson authored
* Pull out GetUserDirectoryTables helper * Don't rebuild the dir in tests that don't need it In #10796 I changed registering a user to add directory entries under. This means we don't have to force a directory regbuild in to tests of the user directory search. * Move test_initial to tests/storage * Add type hints to both test_user_directory files Co-authored-by:
Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
-
- Sep 29, 2021
-
-
Patrick Cloke authored
-
- Sep 23, 2021
-
-
Patrick Cloke authored
-
Patrick Cloke authored
This avoids the overhead of searching through the various configuration classes by directly referencing the class that the attributes are in. It also improves type hints since mypy can now resolve the types of the configuration variables.
-
- Sep 22, 2021
-
-
Hillery Shay authored
* add test to check if null code points are being inserted * add logic to detect and replace null code points before insertion into db * lints * add license to test * change approach to null substitution * add type hint for SearchEntry * Add changelog entry Signed-off-by:
H.Shay <shaysquared@gmail.com> * updated changelog * update chanelog message * remove duplicate changelog * Update synapse/storage/databases/main/events.py remove extra space Co-authored-by:
Patrick Cloke <clokep@users.noreply.github.com> * rename and move test file, update tests, delete old test file * fix typo in comments * update _find_highlights_in_postgres to replace null byte with space * replace null byte in sqlite search insertion * beef up and reorganize test for this pr * update changelog * add type hints and update docstring * check db engine directly vs using env variable * refactor tests to be less repetetive * move rplace logic into seperate function * requested changes * Fix typo. * Update synapse/storage/databases/main/search.py Co-authored-by:
reivilibre <olivier@librepush.net> * Update changelog.d/10820.misc Co-authored-by:
Aaron Raimist <aaron@raim.ist> Co-authored-by:
Patrick Cloke <clokep@users.noreply.github.com> Co-authored-by:
reivilibre <olivier@librepush.net> Co-authored-by:
Aaron Raimist <aaron@raim.ist>
-
- Sep 14, 2021
-
-
reivilibre authored
Also enables Mypy for related tests.
-
- Sep 08, 2021
-
-
Erik Johnston authored
Outlier events don't ever have push actions associated with them, so we can skip some expensive queries during event persistence.
-
- Sep 01, 2021
-
-
Eric Eastwood authored
Part of https://github.com/matrix-org/synapse/pull/10566 - Fill in creator whenever we insert into the rooms table - Add background update to backfill any missing creator values
-
- Aug 17, 2021
-
-
reivilibre authored
-
- Aug 04, 2021
-
-
Erik Johnston authored
Ensure we only load an event from the DB once when the same event is requested multiple times at once.
-
- Aug 02, 2021
-
-
reivilibre authored
Co-authored-by:
Erik Johnston <erik@matrix.org>
-
Erik Johnston authored
-
Toni Spets authored
Setting the value will help PostgreSQL free up memory by recycling the connections in the connection pool. Signed-off-by:
Toni Spets <toni.spets@iki.fi>
-
- Jul 26, 2021
-
-
Patrick Cloke authored
-
- Jul 20, 2021
-
-
Erik Johnston 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)
-
Jonathan de Jong authored
-
- Jun 29, 2021
-
-
Erik Johnston authored
This adds a simple best effort locking mechanism that works cross workers.
-
- Jun 22, 2021
-
-
Eric Eastwood authored
Work on https://github.com/matrix-org/matrix-doc/pull/2716
-
- Jun 17, 2021
-
-
Marcus authored
Reformat all files with the new version. Signed-off-by:
Marcus Hoffmann <bubu@bubu1.eu>
-
- Jun 01, 2021
-
-
Richard van der Hoff authored
Empirically, this helped my server considerably when handling gaps in Matrix HQ. The problem was that we would repeatedly call have_seen_events for the same set of (50K or so) auth_events, each of which would take many minutes to complete, even though it's only an index scan.
-
- May 21, 2021
-
-
Erik Johnston authored
-