Send a SSS response immediately if the config has changed and there are new results to sync#19714
Merged
erikjohnston merged 3 commits intoelement-hq:developfrom Apr 24, 2026
Conversation
…re new results to sync
074ea41 to
30117dc
Compare
30117dc to
4a9158e
Compare
This just makes it easier to follow.
erikjohnston
approved these changes
Apr 24, 2026
Member
erikjohnston
left a comment
There was a problem hiding this comment.
Thanks for finding this!
| @@ -0,0 +1 @@ | |||
| Have SSS return a new response immediately if a room subscription have changed and produced a new response. | |||
Contributor
There was a problem hiding this comment.
The PR description says this fixes #18844
But I don't see an associated test update as described in #18844 (comment)
| sync_config.user.to_string(), | ||
| timeout_ms, | ||
| current_sync_callback, | ||
| from_token=now_token, |
Contributor
There was a problem hiding this comment.
Just to make sure I'm following this logic, we use now_token here because we already checked for data between from_token -> now_token with the first current_sync_for_user(...) call above and found nothing. So we can save trying to lookup anything in that range and jump from now_token -> token after waiting
Feels like this deserves a comment as an optimization. Something along the lines of from_token.stream_token still being the right answer but we can save ... because ...
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.
This fixes the bug described in #19713 (and double-checked against the SDK integration test, which now passes with this change). A sync response must be returned immediately if a room subscription configuration change caused a new non-empty response (checked with
if responsein the code) to be produced.Fixes #19713.
Fixes #18844.