This repository was archived by the owner on Sep 11, 2024. It is now read-only.
Fix issue with room duplication caused by filtering and selecting room using keyboard#6389
Closed
t3chguy wants to merge 1 commit into
Closed
Fix issue with room duplication caused by filtering and selecting room using keyboard#6389t3chguy wants to merge 1 commit into
t3chguy wants to merge 1 commit into
Conversation
…m using keyboard Wrap sticky room updates in lock to prevent setStickyRoom running in middle of setKnownRooms
Member
Author
|
Hmm, it looks like 75% of the async nature of the RLS is due to it making the |
dbkr
approved these changes
Jul 16, 2021
Member
dbkr
left a comment
There was a problem hiding this comment.
Looks like a sensible workaround but yeah, agreed - the fact that stuff is async for no immediate reason is a bit terrifying.
Member
Author
|
Succeeded by #6391 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Wrap sticky room updates in lock to prevent
setStickyRoomrunning in middle ofsetKnownRoomsFixes the most common reproductions of element-hq/element-web#14508 but likely not all
So I reproduced this 100% of the time when filtering room list and selecting the room using keyboard.
The difference this has is it also clears the filter at the same time.
This makes two events race in the RoomListStore:
This issue came about from when the filtering was split into prefiltering and runtime filtering as prior to that the filters were applied later.
In theory a mutex around the critical path in setKnownRooms solves this.
I can no longer reproduce it using the steps which reproduced it 100% of the time for me.
This is much less invasive than #6024
But there is a significant likelihood that other reproduction methods for the same symptoms may still be possible given this is just one race and the RoomListStore is rather complex and has too much async logic.