Skip to content

feat(base): Explicitly handle the CrossProcessLockKind::Dirty case in MediaStore#5855

Merged
Hywan merged 2 commits intomatrix-org:mainfrom
Hywan:feat-cross-process-lock-media
Nov 11, 2025
Merged

feat(base): Explicitly handle the CrossProcessLockKind::Dirty case in MediaStore#5855
Hywan merged 2 commits intomatrix-org:mainfrom
Hywan:feat-cross-process-lock-media

Conversation

@Hywan
Copy link
Copy Markdown
Member

@Hywan Hywan commented Nov 11, 2025

This patch replaces the into_guard() call by a match over CrossProcessLockKind so that the Dirty case is explicitly handled.

The mid-term idea is to remove the into_guard() method because it is “dangerous” as it hides the Dirty case.


@Hywan Hywan requested a review from a team as a code owner November 11, 2025 13:39
@Hywan Hywan requested review from poljar and stefanceriu and removed request for a team and stefanceriu November 11, 2025 13:39
@Hywan Hywan force-pushed the feat-cross-process-lock-media branch from 671d243 to 70be27b Compare November 11, 2025 13:41
Copy link
Copy Markdown
Member

@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.

Noice 👍

Comment thread crates/matrix-sdk-common/src/cross_process_lock.rs Outdated
…in `MediaStore`.

This patch replaces the `into_guard()` call by a `match` over
`CrossProcessLockKind` so that the `Dirty` case is explicitly handled.

The mid-term idea is to remove the `into_guard()` method because it
is “dangerous” as it hides the `Dirty` case.
@Hywan Hywan force-pushed the feat-cross-process-lock-media branch from 70be27b to e32dfb4 Compare November 11, 2025 13:45
@Hywan Hywan mentioned this pull request Nov 11, 2025
13 tasks
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Nov 11, 2025

CodSpeed Performance Report

Merging #5855 will not alter performance

Comparing Hywan:feat-cross-process-lock-media (e32dfb4) with main (f61ba4f)

Summary

✅ 50 untouched

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 11, 2025

Codecov Report

❌ Patch coverage is 20.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.59%. Comparing base (e79f832) to head (e32dfb4).
⚠️ Report is 6 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
crates/matrix-sdk-base/src/media/store/mod.rs 20.00% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5855      +/-   ##
==========================================
- Coverage   88.60%   88.59%   -0.02%     
==========================================
  Files         362      362              
  Lines      102303   102307       +4     
  Branches   102303   102307       +4     
==========================================
- Hits        90643    90635       -8     
- Misses       7440     7453      +13     
+ Partials     4220     4219       -1     

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

@Hywan Hywan merged commit a3424a7 into matrix-org:main Nov 11, 2025
53 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