synapse-product/synapse/storage/databases/main
David Robertson 60453315bd
Always add local users to the user directory (#10796)
It's a simplification, but one that'll help make the user directory logic easier
to follow with the other changes upcoming. It's not strictly required for those
changes, but this will help simplify the resulting logic that listens for
`m.room.member` events and generally make the logic easier to follow.

This means the config option `search_all_users` ends up controlling the
search query only, and not the data we store. The cost of doing so is an
extra row in the `user_directory` and `user_directory_search` tables for
each local user which

- belongs to no public rooms
- belongs to no private rooms of size ≥ 2

I think the cost of this will be marginal (since they'll already have entries
 in `users` and `profiles` anyway).

As a small upside, a homeserver whose directory was built with this
change can toggle `search_all_users` without having to rebuild their
directory.

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2021-09-21 12:02:34 +00:00
..
__init__.py Verify ?chunk_id actually corresponds to an insertion event that exists (MSC2716) (#10776) 2021-09-15 09:34:30 +01:00
account_data.py Fix remove_stale_pushers job on SQLite. (#10843) 2021-09-20 10:26:13 +01:00
appservice.py Use inline type hints in http/federation/, storage/ and util/ (#10381) 2021-07-15 12:46:54 -04:00
cache.py add a cache to have_seen_event (#9953) 2021-06-01 12:04:47 +01:00
censor_events.py Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
client_ips.py Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
deviceinbox.py [pyupgrade] synapse/ (#10348) 2021-07-19 15:28:05 +01:00
devices.py Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
directory.py Allow room_alias_name parameter to be handled by /createRoom calls on workers (#10757) 2021-09-06 14:37:15 +01:00
e2e_room_keys.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
end_to_end_keys.py Fix could not serialize access errors for claim_e2e_one_time_keys (#10504) 2021-08-04 13:09:04 +01:00
event_federation.py Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
event_push_actions.py Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
events_bg_updates.py Fix remove_stale_pushers job on SQLite. (#10843) 2021-09-20 10:26:13 +01:00
events_forward_extremities.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
events_worker.py Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
events.py Fix remove_stale_pushers job on SQLite. (#10843) 2021-09-20 10:26:13 +01:00
filtering.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
group_server.py [pyupgrade] synapse/ (#10348) 2021-07-19 15:28:05 +01:00
keys.py Add missing type hints to synapse.util (#9982) 2021-05-24 15:32:01 -04:00
lock.py Fix dropping locks on shut down (#10433) 2021-07-20 14:24:25 +01:00
media_repository.py Add an admin API for unprotecting local media from quarantine (#10040) 2021-05-26 11:19:47 +01:00
metrics.py Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
monthly_active_users.py Replace or_ignore in simple_insert with simple_upsert (#10442) 2021-07-22 12:39:50 +01:00
openid.py Convert additional databases to async/await part 2 (#8200) 2020-09-01 08:39:04 -04:00
presence.py Add a partial index to presence_stream to speed up startups (#10748) 2021-09-03 17:16:56 +01:00
profile.py Fix deactivate a user if he does not have a profile (#10252) 2021-07-06 13:08:53 +01:00
purge_events.py Make backfill and get_missing_events use the same codepath (#10645) 2021-08-26 18:34:57 +01:00
push_rule.py Use inline type hints in http/federation/, storage/ and util/ (#10381) 2021-07-15 12:46:54 -04:00
pusher.py Fix remove_stale_pushers job on SQLite. (#10843) 2021-09-20 10:26:13 +01:00
receipts.py Combine LruCache.invalidate and invalidate_many (#9973) 2021-05-27 10:33:56 +01:00
registration.py Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
rejections.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
relations.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
room_batch.py Verify ?chunk_id actually corresponds to an insertion event that exists (MSC2716) (#10776) 2021-09-15 09:34:30 +01:00
room.py Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
roommember.py Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
search.py Remove synapse.types.Collection (#9856) 2021-04-22 16:43:50 +01:00
session.py Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
signatures.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
state_deltas.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
state.py Fix remove_stale_pushers job on SQLite. (#10843) 2021-09-20 10:26:13 +01:00
stats.py Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
stream.py Use inline type hints in http/federation/, storage/ and util/ (#10381) 2021-07-15 12:46:54 -04:00
tags.py Use inline type hints in http/federation/, storage/ and util/ (#10381) 2021-07-15 12:46:54 -04:00
transactions.py Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
ui_auth.py Fix remove_stale_pushers job on SQLite. (#10843) 2021-09-20 10:26:13 +01:00
user_directory.py Always add local users to the user directory (#10796) 2021-09-21 12:02:34 +00:00
user_erasure_store.py Minor @cachedList enhancements (#9975) 2021-05-14 11:12:36 +01:00