This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Non lazy loading sync not blocking during fast join #14831
Closed
Closed
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
3bad02f
Non lazy loading sync not blocking during fast join
661e25b
Address comments
b01ec64
Apply suggestions from code review
4441f5b
Move changelog to feature
33d9642
Use AbstractSet
6023bee
typo un_partial_state vs un_partial_stated
1cca9eb
Address comment
fbfafca
oups whitespace
6472178
Optimize get_un_partial_stated_rooms_between
7b60abe
Do not call get_un_partial_stated_rooms_between on initial sync
46062d8
Notify user stream listeners to wake up long polling syncs
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1819,8 +1819,12 @@ async def _generate_sync_entry_for_rooms( | |
|
||
# Retrieve rooms that got un partial stated in the meantime, only useful in case | ||
# of a non lazy-loading-members sync. | ||
# We also skip calculating that in case of initial sync since we don't need it. | ||
un_partial_stated_rooms = set() | ||
if not sync_result_builder.sync_config.filter_collection.lazy_load_members(): | ||
if ( | ||
since_token | ||
and not sync_result_builder.sync_config.filter_collection.lazy_load_members() | ||
): | ||
un_partial_stated_rooms_since = 0 | ||
DMRobertson marked this conversation as resolved.
Show resolved
Hide resolved
|
||
if sync_result_builder.since_token is not None: | ||
un_partial_stated_rooms_since = ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because we're checking since_token on +1825, we always hit +1830. So 1828 and 1829 are redundant. |
||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not following you here. I thought we want to exclude partially-joined rooms from all non-lazy load syncs. Why should that not also apply to an initial, non-lazy sync?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We skip calculating the rooms that got unpartialstated because in case of initial, we have another piece of code that already exclude any partial stated rooms. The stream of unpartialstated rooms is only useful to know which ones have been unpartialed between 2 syncs, for an initial sync we just directly check the DB.