Skip to content

change(notification_client): use cross process locking event and media stores instead of in-memory ones#5934

Closed
stefanceriu wants to merge 5 commits into
mainfrom
stefan/notificationClientCrossProcessLockingStores
Closed

change(notification_client): use cross process locking event and media stores instead of in-memory ones#5934
stefanceriu wants to merge 5 commits into
mainfrom
stefan/notificationClientCrossProcessLockingStores

Conversation

@stefanceriu
Copy link
Copy Markdown
Member

This will allow the NSE process to populate the event cache store with even data after retrieving it from sync, as opposed to dropping after rendering the notification it as it did previously.

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 8, 2025

Codecov Report

❌ Patch coverage is 85.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.94%. Comparing base (fbff1ee) to head (e98e4f5).
⚠️ Report is 66 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
crates/matrix-sdk-base/src/client.rs 75.00% 6 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5934   +/-   ##
=======================================
  Coverage   88.93%   88.94%           
=======================================
  Files         357      357           
  Lines       99195    99219   +24     
  Branches    99195    99219   +24     
=======================================
+ Hits        88224    88247   +23     
- Misses       6987     6990    +3     
+ Partials     3984     3982    -2     

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

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Dec 8, 2025

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing stefan/notificationClientCrossProcessLockingStores (e98e4f5) with main (fbff1ee)

Summary

✅ 50 untouched benchmarks

@stefanceriu stefanceriu requested a review from Hywan December 8, 2025 11:09
@stefanceriu stefanceriu force-pushed the stefan/notificationClientCrossProcessLockingStores branch from e377d58 to a836b72 Compare December 12, 2025 11:06
Comment thread crates/matrix-sdk-base/src/client.rs Outdated
Comment on lines +232 to +233
event_cache_store: self.event_cache_store.clone(),
media_store: self.media_store.clone(),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

⚠️ This is wrong!

You're cloning the EventCacheStoreLock and MediaStoreLock, with the main cross-process holder name. It doesn't use the new cross_process_store_locks_holder_name received by argument here.

@Hywan Hywan force-pushed the stefan/notificationClientCrossProcessLockingStores branch 2 times, most recently from 77931b6 to 116003a Compare December 19, 2025 13:58
stefanceriu and others added 5 commits January 16, 2026 10:05
…a stores instead of in-memory ones

This will allow the NSE process to populate the event cache store with even data after retrieving it from sync, as opposed to dropping after rendering the notification it as it did previously.
This patch renames `clone_with_in_memory_state_store` to
`derive_states_for_notification_client`. At least it clarifies what it
does.
@stefanceriu stefanceriu force-pushed the stefan/notificationClientCrossProcessLockingStores branch from d0571f6 to e98e4f5 Compare January 16, 2026 08:05
@Hywan
Copy link
Copy Markdown
Member

Hywan commented Jan 16, 2026

@stefanceriu if you want to give another try, have fun!

@stefanceriu
Copy link
Copy Markdown
Member Author

Turns out this doesn't actually work and we probably do need the state store cross process lock. Will raise again once we're ready to do this properly.

@stefanceriu stefanceriu deleted the stefan/notificationClientCrossProcessLockingStores branch April 28, 2026 11:34
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