Skip to content
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

Invalidate crypto store cache when entering foreground #1854

Merged
merged 4 commits into from
May 29, 2024

Conversation

BillCarsonFr
Copy link
Member

@BillCarsonFr BillCarsonFr commented May 24, 2024

Pull Request Checklist

depends on matrix-org/matrix-rust-sdk#3462

Partial fix for the NSE process causing olm session wedging.
See element-x related issue matrix-org/matrix-rust-sdk#3110.

The crypto store is keeping a cache of olm sessions for a given device. When using multiprocess this cache will get outdated and causing session wedging.
If the main app is inactive and the NSE do process a sync new olm sessions might be created (or mutated, like when replying to a key request). If the main process is then resumed it will use it's outdated cache instead of reloading from store.

The improvement here is that we will invalidate the cache when the main app enters foreground to limit the possible occurences of outdated caches.

Copy link
Contributor

@stefanceriu stefanceriu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, looks good to me. Hope the tests agree 🤞

@BillCarsonFr BillCarsonFr marked this pull request as ready for review May 28, 2024 14:48
@stefanceriu stefanceriu merged commit 7399902 into develop May 29, 2024
3 checks passed
@stefanceriu stefanceriu deleted the valere/NSE_partial_fix branch May 29, 2024 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants