Merged
Conversation
When a remote user has a device list update, an entry is expected to appear in `device_lists.changed` in the `/sync` response. The local homeserver may then query the remote homeserver for the update. Some homeservers (Synapse) may emit extra `device_lists.changed` updates in `/sync` responses after querying keys. Previously, we attempted to skip over the spurious `device_lists.changed` updates by doing another sync. This wasn't sufficient, so we make another remote user send a device list update, and wait for that to appear. Fixes #580. Signed-off-by: Sean Quah <seanq@matrix.org>
DMRobertson
reviewed
Feb 1, 2023
| ) func(t *testing.T, nextBatch string) string { | ||
| t.Helper() | ||
|
|
||
| barry := deployment.RegisterUser(t, otherHSName, generateLocalpart("barry"), "password", false) |
Contributor
There was a problem hiding this comment.
excellent choice of username :)
Comment on lines
+109
to
+110
| // The barrier tries to ensure that `device_lists.changed` entries resulting from device list | ||
| // updates and queries before the barrier do not appear in `/sync` responses after the barrier. |
Contributor
There was a problem hiding this comment.
Have I understood this correctly?
We make something new happen in the device lists stream for barry and wait to see the result happen. Because
- barry's change happens after any "no-op" device_list.changed entries, and
- the device list stream is sequential/linear(?)
by the time we've seen device_lists.changed for barry we will have already seen the "no-op" `device_list.changed" (if it was generated at all).
Contributor
Author
There was a problem hiding this comment.
That's the idea, yes.
DMRobertson
approved these changes
Feb 1, 2023
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.
When a remote user has a device list update, an entry is expected to appear in
device_lists.changedin the/syncresponse. The local homeserver may thenquery the remote homeserver for the update. Some homeservers (Synapse) may emit
extra
device_lists.changedupdates in/syncresponses after querying keys.Previously, we attempted to skip over the spurious
device_lists.changedupdates by doing another sync. This wasn't sufficient, so we make another
remote user send a device list update, and wait for that to appear.
Fixes #580.
Signed-off-by: Sean Quah seanq@matrix.org
Fixes matrix-org/synapse#14103.