-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add is_dm
filtering to Sliding Sync /sync
#17244
Closed
MadLittleMods
wants to merge
137
commits into
develop
from
madlittlemods/msc3575-sliding-sync-filtering
Closed
Add is_dm
filtering to Sliding Sync /sync
#17244
MadLittleMods
wants to merge
137
commits into
develop
from
madlittlemods/msc3575-sliding-sync-filtering
Conversation
This file contains 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
Based on: - MSC3575: Sliding Sync (aka Sync v3): matrix-org/matrix-spec-proposals#3575 - MSC3885: Sliding Sync Extension: To-Device messages: matrix-org/matrix-spec-proposals#3885 - MSC3884: Sliding Sync Extension: E2EE: matrix-org/matrix-spec-proposals#3884
We were using the enum just to distinguish /sync v2 vs Sliding Sync /sync/e2ee so we should just make an enum for that instead of trying to glom onto the existing `sync_type` (overloading it).
Conflicts: synapse/handlers/sync.py tests/handlers/test_sync.py
Conflicts: synapse/storage/databases/main/roommember.py
…emods/msc3575-sliding-sync-filtering Conflicts: tests/handlers/test_sliding_sync.py tests/rest/client/test_sync.py
MadLittleMods
force-pushed
the
madlittlemods/msc3575-sliding-sync-filtering
branch
from
June 4, 2024 18:27
f3a6985
to
555ba4b
Compare
Previously, we added back newly_left rooms and our second fixup was removing them. We can just switch the order of the fixups to solve this.
…sync_room_ids_for_user` implementation The new implementation catches the problem with an assert but I think it's possible to make it work as well. ``` SYNAPSE_POSTGRES=1 SYNAPSE_POSTGRES_USER=postgres SYNAPSE_TEST_LOG_LEVEL=INFO poetry run trial tests.handlers.test_sliding_sync.GetSyncRoomIdsForUserEventShardTestCase ```
…ltiple event persisters Before, the problem scenario would get caught in one of the assertions because we expect the to_token <= membership_snapshot_token or vice-versa but it's possible the tokens are intertwined and neither is ahead of each other. Especially since the `instance_map` in `membership_snapshot_token` is made up from the `stream_ordering` of membership events at various stream positions and processed on different instances (not current stream positions). We get into trouble when stream positions are lagging between workers and our now/`to_token` doesn't cleanly compare to `membership_snapshot_token`. What we really want to assert is that the `to_token` <= the stream positions at the time we asked for the room membership snapshot. Since `get_rooms_for_local_user_where_membership_is()` doesn't return that information, the closest we can get is to get the stream positions before we ask for the room membership snapshot and consider that good enough to compare against.
Co-authored-by: Erik Johnston <erikj@element.io>
See #17187 (comment) `get_membership_changes_for_user(from_key=xxx, to_key=xxx)` will handle getting out what we need and filter the results based on the tokens (even in cases where the from_key is ahead of the to_key).
…emods/msc3575-sliding-sync-filtering Conflicts: tests/handlers/test_sliding_sync.py
…emods/msc3575-sliding-sync-filtering
Base automatically changed from
madlittlemods/msc3575-sliding-sync-0.0.1
to
develop
June 6, 2024 19:44
Conflicts: synapse/handlers/sliding_sync.py tests/handlers/test_sliding_sync.py tests/rest/client/test_sync.py
Closing in favor of #17277 to get rid of the commits that keep following us from being based on the initial branch |
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.
Add
is_dm
filtering to Sliding Sync/sync
Based on MSC3575: Sliding Sync
Pull Request Checklist
EventStore
toEventWorkerStore
.".code blocks
.(run the linters)