summary refs log tree commit diff
path: root/synapse/storage/databases/main/sliding_sync.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Move index creation to background update (#18439)Erik Johnston2025-05-151-0/+8
| | | | | | | | Follow on from #18375. This prevents blocking startup on creating the index, which can take a while --------- Co-authored-by: Devon Hudson <devon.dmytro@gmail.com>
* Add index to sliding sync membership snapshot table, to fix a performance ↵reivilibre2025-03-181-1/+8
| | | | | | | | | | | | issue. (#18074) To address a performance problem due to the foreign key on the same column. cc @erikjohnston --------- Signed-off-by: Olivier 'reivilibre <oliverw@matrix.org>
* Speed up slow initial sliding syncs on large servers (#17946)Erik Johnston2024-11-191-1/+21
| | | | This was due to a missing index, which meant that deleting previous connections associated with the device and `conn_id` took a long time.
* Correctly changes to required state config in sliding sync (#17785)Erik Johnston2024-10-141-2/+2
| | | | | | | | | | | | | | | | | | Fixes https://github.com/element-hq/synapse/issues/17698 This handles `required_state` changes by checking if new state has been added to the config, and if so fetching and returning that from the current state. This also takes care to ensure that given a state entry S that is added, removed and then re-added that we do *not* send S down a second time if there have been no changes to S in the current state. This is fine for Rust SDK (as it just remembers all state), but we might decide not to do this behaviour in the MSC. If we decide to always send down S then its easy enough to rip out all the code. --------- Co-authored-by: Eric Eastwood <eric.eastwood@beta.gouv.fr>
* Sliding sync: Add connection tracking to the `account_data` extension (#17695)Erik Johnston2024-09-191-0/+37
| | | | | | | | | | | This is basically exactly the same logic as for receipts. Essentially we just need to track which room account data we have and haven't sent down to clients, and use that when we pull stuff out. I think this just needs a couple of extra tests written --------- Co-authored-by: Eric Eastwood <eric.eastwood@beta.gouv.fr>
* Sliding Sync: Get `bump_stamp` from new sliding sync tables because it's ↵Eric Eastwood2024-09-091-0/+40
| | | | | | | | faster (#17658) Get `bump_stamp` from [new sliding sync tables](https://github.com/element-hq/synapse/pull/17512) which should be faster (performance) than flipping through the latest events in the room.
* Sliding sync: Store the per-connection state in the database. (#17599)Erik Johnston2024-08-291-0/+491
Based on #17600 --------- Co-authored-by: Eric Eastwood <eric.eastwood@beta.gouv.fr>