Update event push action and receipt tables to support threads. (#13753)
Adds a `thread_id` column to the `event_push_actions`, `event_push_actions_staging`, and `event_push_summary` tables. This will notifications to be segmented by the thread in a future pull request. The `thread_id` column stores the root event ID or the special value `"main"`. The `thread_id` column for `event_push_actions` and `event_push_summary` is backfilled with `"main"` for all existing rows. New entries into `event_push_actions` and `event_push_actions_staging` will get the proper thread ID. `receipts_linearized` and `receipts_graph` also gain a `thread_id` column, which is similar, except `NULL` is a special value meaning the receipt is "unthreaded". See MSC3771 and MSC3773 for where this data will be useful.
Showing
- changelog.d/13753.misc 1 addition, 0 deletionschangelog.d/13753.misc
- synapse/push/bulk_push_rule_evaluator.py 15 additions, 14 deletionssynapse/push/bulk_push_rule_evaluator.py
- synapse/storage/databases/main/event_push_actions.py 118 additions, 3 deletionssynapse/storage/databases/main/event_push_actions.py
- synapse/storage/databases/main/events.py 2 additions, 2 deletionssynapse/storage/databases/main/events.py
- synapse/storage/databases/main/receipts.py 20 additions, 0 deletionssynapse/storage/databases/main/receipts.py
- synapse/storage/schema/__init__.py 5 additions, 1 deletionsynapse/storage/schema/__init__.py
- synapse/storage/schema/main/delta/72/06thread_notifications.sql 30 additions, 0 deletions...e/storage/schema/main/delta/72/06thread_notifications.sql
- synapse/storage/schema/main/delta/72/07thread_receipts.sql.postgres 30 additions, 0 deletions...orage/schema/main/delta/72/07thread_receipts.sql.postgres
- synapse/storage/schema/main/delta/72/07thread_receipts.sql.sqlite 70 additions, 0 deletions...storage/schema/main/delta/72/07thread_receipts.sql.sqlite
- synapse/storage/schema/main/delta/72/08thread_receipts.sql 20 additions, 0 deletionssynapse/storage/schema/main/delta/72/08thread_receipts.sql
- tests/replication/slave/storage/test_events.py 1 addition, 0 deletionstests/replication/slave/storage/test_events.py
Loading
Please register or sign in to comment