Skip to content

Conversation

Hywan
Copy link
Member

@Hywan Hywan commented Sep 15, 2025

@Hywan Hywan force-pushed the feat-cross-process-lock-poisoning branch from 3c168ad to 976f768 Compare September 16, 2025 09:22
Copy link

codecov bot commented Sep 16, 2025

Codecov Report

❌ Patch coverage is 86.85446% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.39%. Comparing base (688eb68) to head (985032c).
⚠️ Report is 13 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
crates/matrix-sdk-common/src/cross_process_lock.rs 80.89% 10 Missing and 7 partials ⚠️
crates/matrix-sdk-sqlite/src/crypto_store.rs 88.88% 1 Missing and 2 partials ⚠️
crates/matrix-sdk-sqlite/src/event_cache_store.rs 88.00% 1 Missing and 2 partials ⚠️
crates/matrix-sdk-sqlite/src/media_store.rs 88.00% 1 Missing and 2 partials ⚠️
crates/matrix-sdk/src/encryption/mod.rs 50.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5672   +/-   ##
=======================================
  Coverage   88.38%   88.39%           
=======================================
  Files         358      358           
  Lines       98939    99035   +96     
  Branches    98939    99035   +96     
=======================================
+ Hits        87451    87538   +87     
- Misses       7352     7357    +5     
- Partials     4136     4140    +4     

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

Copy link

codspeed-hq bot commented Sep 16, 2025

CodSpeed Performance Report

Merging #5672 will not alter performance

Comparing Hywan:feat-cross-process-lock-poisoning (985032c) with main (d6d720c)

Summary

✅ 50 untouched

@Hywan Hywan force-pushed the feat-cross-process-lock-poisoning branch 3 times, most recently from 39b6f56 to b29747d Compare September 16, 2025 16:33
@Hywan Hywan force-pushed the feat-cross-process-lock-poisoning branch 4 times, most recently from 8140fdc to 891db14 Compare September 26, 2025 10:02
This patch adds `CrossProcessLockGeneration`. A lock generation is an
integer incremented each time the lock is taken by another holder. If
the generation changes, it means the lock is _dirtied_. This _dirtying_
aspect is going to be expanded in the next patches. This patch focuses
on the introduction of this _generation_.

The `CrossProcessLock::try_lock_once` method, and
the `TryLock::try_lock` method, both returns a
`Option<CrossProcessLockGeneration>` instead of a `bool`: `true` is
replaced by `Some(_)`, `false` by `None`.
This patch detects when the cross-process lock has been dirtied.

A new `CrossProcessLockResult` enum is introduced to simplify the
returned value of `try_lock_once` and `spin_lock`. It flattens the
previous `Result<Option<_>>` by providing 3 variants: `Clean`, `Dirty`
and `Unobtained`.
@Hywan Hywan force-pushed the feat-cross-process-lock-poisoning branch from 891db14 to 985032c Compare September 26, 2025 12:51
@Hywan Hywan changed the title feat(common): Add cross-process lock poison feat(common): Add cross-process lock dirtying Sep 26, 2025
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