Sliding sync: use new DB tables#17630
Merged
Merged
Conversation
17 tasks
Co-authored-by: Eric Eastwood <eric.eastwood@beta.gouv.fr>
Co-authored-by: Eric Eastwood <eric.eastwood@beta.gouv.fr>
3f546ec to
e76954b
Compare
a26f46d to
e923a8d
Compare
| ) -> Dict[str, RoomsForUserSlidingSync]: | ||
| sql = """ | ||
| SELECT m.room_id, m.sender, m.membership, m.membership_event_id, | ||
| r.room_version, |
Contributor
There was a problem hiding this comment.
It looks like we're simply fetching out room_version_id just because that's what's in a RoomsForUser. We don't use it anywhere in the Sliding Sync code (as far as I can tell).
- We can remove it from
RoomsForUserSlidingSync - We should just use a different data type. Probably the same as
RoomsForUserbut withoutroom_version_id. We could haveRoomsForUserSlidingSyncandRoomsForUserSlidingSyncWithStatefor example
Contributor
There was a problem hiding this comment.
This could be addressed in a future PR. Probably would be good to create an issue for this one
Member
Author
There was a problem hiding this comment.
Ah, yeah. So, I had the same thought about removing it, but it turns out that sync v2 specifically checks that the room version is known and so we should probably do something similar in sliding sync as well.
MadLittleMods
approved these changes
Aug 30, 2024
erikjohnston
added a commit
that referenced
this pull request
Sep 4, 2024
Broke in #17630 --------- Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
6 tasks
MadLittleMods
added a commit
that referenced
this pull request
Sep 11, 2024
…ng_sync_rooms_for_user(...)` (#17692) We need to bust the `get_sliding_sync_rooms_for_user` cache when the room encryption is updated and any other field that is used in the query. Follow-up to #17630 - Bust cache for membership change (cross-reference `get_rooms_for_user`) - Bust cache for room `encryption` (cross-reference `get_room_encryption`) - Bust cache for `forgotten` (cross-reference `did_forget`/`get_forgotten_rooms_for_user`)
This was referenced Sep 11, 2024
MadLittleMods
added a commit
that referenced
this pull request
Sep 12, 2024
Move filters tests to rest layer in order to test the new (with sliding sync tables) and fallback paths that Sliding Sync can use. Also found a bug in the new path because it's not being tested which is also fixed in this PR. We now take into account `has_known_state` when filtering. Spawning from #17662 (comment). This should have been done when we started using the new sliding sync tables in #17630
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on #17629
Utilizing the new sliding sync tables added in #17512 for fast acquisition of rooms for the user and filtering/sorting.