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

fix(sdk): Clear all sliding sync room subscriptions when session expires #3871

Merged

Conversation

Hywan
Copy link
Member

@Hywan Hywan commented Aug 21, 2024

This patch clears all sliding sync room subscriptions when a session expires. Indeed, we might not want to request all room subscriptions when the session restarts. Imagine if the client has subscribed to 400 rooms and the session expires: once the session restarts, it will ask for 400 room subscriptions, which is a lot and will result in a quite slow response.


@Hywan Hywan requested a review from a team as a code owner August 21, 2024 11:45
@Hywan Hywan requested review from jmartinesp and bnjbvr and removed request for a team and jmartinesp August 21, 2024 11:45
@Hywan Hywan mentioned this pull request Aug 21, 2024
32 tasks
Copy link

codecov bot commented Aug 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.09%. Comparing base (f6b21e6) to head (9f53026).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3871      +/-   ##
==========================================
- Coverage   84.10%   84.09%   -0.02%     
==========================================
  Files         261      261              
  Lines       27656    27657       +1     
==========================================
- Hits        23261    23257       -4     
- Misses       4395     4400       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@bnjbvr bnjbvr left a comment

Choose a reason for hiding this comment

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

LGTM with comments addressed, thanks

crates/matrix-sdk/src/sliding_sync/mod.rs Outdated Show resolved Hide resolved
crates/matrix-sdk/src/sliding_sync/mod.rs Outdated Show resolved Hide resolved
…res.

This patch clears all sliding sync room subscriptions when a session
expires. Indeed, we might not want to request all room subscriptions
when the session restarts. Imagine if the client has subscribed to 400
rooms and the session expires: once the session restarts, it will ask
for 400 room subscriptions, which is a lot and will result in a quite
slow response.
@Hywan Hywan force-pushed the fix-sdk-sliding-sync-room-subscriptions branch from 574147c to 9f53026 Compare August 21, 2024 16:16
@Hywan Hywan enabled auto-merge (rebase) August 21, 2024 16:18
@Hywan Hywan merged commit 40d447d into matrix-org:main Aug 21, 2024
40 checks passed
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.

2 participants