anonymousland-synapse/synapse
Sean Quah 9cae44f49e
Track unconverted device list outbound pokes using a position instead (#14516)
When a local device list change is added to
`device_lists_changes_in_room`, the `converted_to_destinations` flag is
set to `FALSE` and the `_handle_new_device_update_async` background
process is started. This background process looks for unconverted rows
in `device_lists_changes_in_room`, copies them to
`device_lists_outbound_pokes` and updates the flag.

To update the `converted_to_destinations` flag, the database performs a
`DELETE` and `INSERT` internally, which fragments the table. To avoid
this, track unconverted rows using a `(stream ID, room ID)` position
instead of the flag.

From now on, the `converted_to_destinations` column indicates rows that
need converting to outbound pokes, but does not indicate whether the
conversion has already taken place.

Closes #14037.

Signed-off-by: Sean Quah <seanq@matrix.org>
2022-11-22 16:46:52 +00:00
..
_scripts let update_synapse_database run on a multi-database configurations (#13422) 2022-10-19 19:08:40 +01:00
api Remove redundant types from comments. (#14412) 2022-11-16 15:25:24 +00:00
app Remove need for worker_main_http_uri setting to use /keys/upload. (#14400) 2022-11-16 22:16:25 +00:00
appservice Merge branch 'master' into develop 2022-10-28 15:59:51 +01:00
config Reduce default third party invite rate limit to 216 invites per day (#14487) 2022-11-18 18:10:01 +00:00
crypto Fix /key/v2/server calls with URL-unsafe key IDs (#14490) 2022-11-18 19:56:42 +00:00
events Faster joins: do not wait for full state when creating events to send (#14403) 2022-11-17 17:01:14 +01:00
federation Faster joins: filter out non local events when a room doesn't have its full state (#14404) 2022-11-21 16:46:14 +01:00
handlers Track unconverted device list outbound pokes using a position instead (#14516) 2022-11-22 16:46:52 +00:00
http Remove redundant types from comments. (#14412) 2022-11-16 15:25:24 +00:00
logging Remove redundant types from comments. (#14412) 2022-11-16 15:25:24 +00:00
metrics Avoid incrementing bg process utime/stime counters by negative durations (#14323) 2022-10-31 13:02:07 +00:00
module_api Remove redundant types from comments. (#14412) 2022-11-16 15:25:24 +00:00
push Send content rules with pattern_type to clients (#14356) 2022-11-15 15:29:30 +00:00
replication Fix check to ignore blank lines in incoming TCP replication (#14449) 2022-11-17 16:09:56 +00:00
res Fix HTML templates missing correct HTML tags (#14448) 2022-11-16 11:14:38 +00:00
rest Remove need for worker_main_http_uri setting to use /keys/upload. (#14400) 2022-11-16 22:16:25 +00:00
server_notices Remove redundant types from comments. (#14412) 2022-11-16 15:25:24 +00:00
spam_checker_api Fix import in module_api module and docs on the new check_event_for_spam signature (#12918) 2022-05-31 12:04:53 +02:00
state Faster joins: do not wait for full state when creating events to send (#14403) 2022-11-17 17:01:14 +01:00
static Add viewport directive to HTML templates to optimise for mobile (#13493) 2022-08-11 14:04:20 +01:00
storage Track unconverted device list outbound pokes using a position instead (#14516) 2022-11-22 16:46:52 +00:00
streams Remove unused type-ignores (#14433) 2022-11-14 13:46:29 +00:00
util Batch fetch bundled annotations (#14491) 2022-11-22 07:26:11 -05:00
__init__.py Parse SYNAPSE_ASYNC_IO_REACTOR env variable & log the reactor on startup (#14092) 2022-10-07 15:19:59 +01:00
event_auth.py Revert "Fix event size checks (#13710)" 2022-11-01 11:47:09 +00:00
notifier.py Batch up notifications after event persistence (#14033) 2022-10-05 10:12:48 -07:00
py.typed Mark Module API error imports as re-exported and mark Synapse as containing type annotations (#11054) 2021-10-13 08:42:41 +01:00
server.py Fix typechecking errors introduced in #14128 (#14455) 2022-11-15 16:36:43 +00:00
types.py Remove redundant types from comments. (#14412) 2022-11-16 15:25:24 +00:00
visibility.py Faster joins: filter out non local events when a room doesn't have its full state (#14404) 2022-11-21 16:46:14 +01:00